Boost logo

Boost-Build :

Subject: [Boost-build] How to use semaphores
From: olan (o.andriyanov_at_[hidden])
Date: 2018-01-22 15:20:36


I can't get semaphores working (

I have the following jamroot.jam:

import notfile ;

notfile foo : @sleep ;
notfile bar : @sleep ;
actions sleep {
 Â Â Â  sleep 1
JAM_SEMAPHORE on foo bar = s ;

And I build this project with 'b2 -j2'.

I expect build to be complete in 2 seconds since targets 'foo' and 'bar'
are supposed to be serialized, but it completes just in one second, no
matter what.

Unfortunately, I haven't found any working examples of using
JAM_SEMAPHORE. The only ones I found were located deeply in
source files and specified serialized targets indirectly, like $(targets).

Could someone please provide an example of how to properly serialize
execution of two actions with

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at