sd_ble_gap_connect from central to 2 peripherals

Hi

So the central multilink example uses init_scan.connect_if_match = true; Mine is false, because I want to manage the connection myself. 

I'm filtering out 5 seconds of advertisements and using max RSSI to prioritize connections over several instances of the same 2 distinct BLE peripherals. 
This logic is all working. However after 5 seconds, my code wants to connect to both at the same time. 
For example 
Thing A1 - RSSI -30
Thing A2 - RSSI -40
Thing B1 - RSSI -50
Thing B2 - RSSI -40
I'd like to connect to A1 and B2 as quickly as possible. 

What is a good way to manage the connections one at a time? 
I have to wait for the callback to ensure things are connected. 
I'm using a boolean to indicate if the thing is connected or not. 
I was about to add another boolean to indicate 'connecting', and then I decided to post. 

Normally I would use 2 semaphores to signal a task, 

However, I'm using the scheduler now and can only think of posting the same job that manages everything until all of my booleans are set. 

Is there a better way ?

Thanks!
Related