yossigordin
asked on
starting the thread immediatly
Hi everybody,
how can i make the UI thread start immediatly. My problem is when i call the thread class just before the main thread enters a loop, the new window of the thread loads up after the loop is over.
Thanks a million.
yossi
how can i make the UI thread start immediatly. My problem is when i call the thread class just before the main thread enters a loop, the new window of the thread loads up after the loop is over.
Thanks a million.
yossi
or use syncronization, i.e. with an event object:
create a event, after starting the thread in main-thread
wait for the event to be signaled. In new thread signal the
event when you want the main-thread to be continued.
this is 100% safe method while simply using a 'Sleep' cannot
grant that the sub-thread reached the wanted functionality.
ZOPPO
create a event, after starting the thread in main-thread
wait for the event to be signaled. In new thread signal the
event when you want the main-thread to be continued.
this is 100% safe method while simply using a 'Sleep' cannot
grant that the sub-thread reached the wanted functionality.
ZOPPO
ASKER
Hi,
can you elaborate?
I understood the concept , but i can't implement it correctly.
can you help?
yossigordin
can you elaborate?
I understood the concept , but i can't implement it correctly.
can you help?
yossigordin
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi,
10nxs a lot for everything, but i manged to work it out without threads.
yossigordin
10nxs a lot for everything, but i manged to work it out without threads.
yossigordin
Create thread
Sleep(50); // let other threads to work
start loop