BARRIER-UNLOCK question.
"Marco Antoniotti (as marco dot antoniotti at unimib dot it)" <[email protected]>
| Newsgroups | gmane.lisp.lispworks.general |
|---|---|
| Message-ID | <CAG0Nw2=fOLEhtQXVCSEL0gHN+=-b6OjgPU7ShqbDSQViOF4WJw@mail.gmail.com> |
Hi, The description of MP:BARRIER-UNLOCK is the following (and this function seems the most important one in the BARRIER API. I have a few questions about it. "barrier-unblock Function Summary Unblocks a barrier. Package mp Signature barrier-unblock barrier &key disable reset-count kill-waiting Arguments barrier⇩ A barrier. disable⇩ A boolean. reset-count⇩ A positive fixnum, t or nil. kill-waiting⇩ A boolean. Description The function barrier-unblock unblocks the barrier barrier, potentially disabling it, resetting its count or killing the waiting processes. Without keyword arguments, barrier-unblock unblocks barrier, which means that any thread that is waiting on barrier wakes and returns from barrier-wait, and its arriver count is reset to 0. If disable is true, or if disable is not passed and barrier was made with disable-on-unblock true, then barrier-unblock also disables barrier, so any further calls to barrier-wait return nil immediately. If reset-count is non-nil, it must be valid count (a positive fixnum or t), and barrier-unblock sets the count of barrier to this value. If kill-waiting is true, instead of waking up the waiting threads, barrier-unblock kills them (by process-terminate)." What would a call like (mp:barrier-unlock b :reset-count 42) do, when the (barrier-count b) ==> 666? Does the description of mp:barrier-change-count apply here? Also, are there some other supplied keyword combinations that I should be aware of? Thanks Marco -- Marco Antoniotti