http://docwiki.embarcadero.com/Libraries/Tokyo/en/System.SyncObjs.TLightweightSemaphore.Create
http://docwiki.embarcadero.com/Libraries/Tokyo/en/System.SyncObjs.TLightweightSemaphore.Create
Please simply explain to me the parameters of this constructor, especially first, AInitialCount.
Please simply explain to me the parameters of this constructor, especially first, AInitialCount.
Stefan Glienke Ok, if I want threads to be given a semaphore so that they work when it's open (thread execute -> Semaphor.WaitFor) and I want to have as many threads as there are cores (+1 additional) then how should I create TLightweightSemaphore object?
ReplyDeleteWhat Primoz said at the end of the very first comment - put same value for both: TThread.ProcessorCount + 1
ReplyDeleteStefan Glienke Primož Gabrijelčič Thanks
ReplyDelete