replace busy waiting with rwlocks
parallel sequencer tested