mbed library sources. Supersedes mbed-src.
Fork of mbed-dev by
Diff: drivers/Timeout.cpp
- Revision:
- 184:08ed48f1de7f
- Parent:
- 149:156823d33999
diff -r 5166a824ec1a -r 08ed48f1de7f drivers/Timeout.cpp --- a/drivers/Timeout.cpp Tue Mar 20 17:01:51 2018 +0000 +++ b/drivers/Timeout.cpp Thu Apr 19 17:12:19 2018 +0100 @@ -18,7 +18,9 @@ namespace mbed { void Timeout::handler() { - _function.call(); + Callback<void()> local = _function; + detach(); + local.call(); } } // namespace mbed