|
-
November 24th, 2003, 11:43 AM
#1
is timer thread-safe?
Let's say we have 3 timers started by 'SetTimer' on a single window. So we have 3 different static TIMERPROC function.
i.e.
CMyWindow::OnInitialUpdate()
{
...
SetTimer( 1200, 500, (TIMERPROC)Function1 );
SetTimer( 1300, 500, (TIMERPROC)Function2 );
SetTimer( 1400, 500, (TIMERPROC)Function3 );
...
}
//static
UINT CMyWindow::Function1( ... )
{
...
}
and others...
Is there a possibilty of calling any two of Function1, Function2 and Function3 at the same time? Are they processed by a single thread or by three different threads?
-
November 24th, 2003, 11:54 AM
#2
A timer created using SetTimer() is thread-safe. The main thread can only process one line of code at any given time.
Kuphryn
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|