Skip to content

Commit

Permalink
Use schedule() not fiber_sleep(0) in MicroBitSerial.cpp (Fix #461)
Browse files Browse the repository at this point in the history
  - MicroBitSerial use wake_on_event for condition synchronisation.
  - By contract, a fiber doing this should subsequently call schedule()
    and no other blocking operation
  • Loading branch information
finneyj committed Apr 1, 2020
1 parent 76538ef commit f96a390
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/drivers/MicroBitSerial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ void MicroBitSerial::send(MicroBitSerialMode mode)
while(txBufferedSize() > 0);

if(mode == SYNC_SLEEP)
fiber_sleep(0);
schedule();
}

/**
Expand Down

0 comments on commit f96a390

Please sign in to comment.