Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   setNewDataSem (http://www.chiefdelphi.com/forums/showthread.php?t=73025)

wireties 27-01-2009 02:35

setNewDataSem
 
I assume the function setNewDataSem allows me to pass a handle to a semaphore that will get processed each time a data packet arrives.

I'd like to use this mechanism instead of polling to see if a new message has arrived. Is this semaphore given (semGive) or flushed (semFlush) each time?

It does not seem to work no matter how I use it.

Thanks

wireties 01-02-2009 03:49

Re: setNewDataSem
 
This actually does work. You can block any task on a semapahore you register this way. There is no need to give the semaphore back each time, it seems the semaphore gets flushed, not given, each time a new message comes in. So this is a great way to not have to poll to see if a new message has arrived.


All times are GMT -5. The time now is 02:58.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi