Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2017-08

Syncobjs Event and BlockWrite() question

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Brian

When using WaitFor() , ResetEvent and SetEvent as a semaphore , if a thread is using BlockWrite() and the execution of BlockWrite() is conditional on WaitFor() , will BlockWrite() continue to function after it is called once MySemaphore.ResetEvent is called ?

A pseudo code example below

---------main loop----------
MySemaphore.ResetEvent;

doing something

MySemaphore.SetEvent

 ----- Thread------------
  MySemaphore.WaitFor(10);
  BlockWrite()

-------------------------

Thanks
Brian

View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Syncobjs-Event-and-BlockWrite-question-tp5729411.html Sent from the Free Pascal - General mailing list .

Reply by email