[vlc-devel] [PATCH]Win32 screensaver disable change part II
juha.jeronen at jyu.fi
Tue May 3 16:04:31 CEST 2011
On 05/03/11 15:43, Rémi Denis-Courmont wrote:
> On Tuesday 03 May 2011, Juha Jeronen wrote:
>> - Have an instance data struct for the thread, containing only an exit
>> flag (initialized to false in the main thread, just before it starts the
>> new thread). Malloc it, and pass a pointer as the thread argument. The
>> flag will be used for signaling.
> Oh no, never suggest that. This does not fit our (POSIX) threaded memory
> synchronization model.
>> - When the main thread wants to shut down the screensaver prevention
>> thread, it sets the exit flag to true.
>> - When the thread notices that its exit flag has been set to true, it
>> - Finally, we need to take care of the 50-second sleep. How about,
>> instead of
> No. Polling timers are for incompetent programmers.
I did say it was no good :P
> In this case, the thread can sleep for 50 seconds, and be terminated by thread
> cancellation. Alternetiavely, it can use a condition variable and a 50-seconds
This sounds good.
More information about the vlc-devel