From dcc7ecbf6af5420af2d5dbd0e97fc7a2e0e894a6 Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Sun, 9 Oct 2011 00:03:14 +0200 Subject: Use generic lock-free queue for async threads Queues used for communication between async threads and scheduler threads have been replaced with lock-free queues. Drivers using the driver_async functionality are not automatically locked to the system anymore, and can be unloaded as any dynamically linked in driver. Scheduling of ready async jobs is now also interleaved in between other jobs. Previously all ready async jobs was performed at once. --- erts/doc/src/erl_driver.xml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_driver.xml b/erts/doc/src/erl_driver.xml index 2fb03954b6..8e18dd6657 100644 --- a/erts/doc/src/erl_driver.xml +++ b/erts/doc/src/erl_driver.xml @@ -1638,12 +1638,19 @@ ERL_DRV_EXT2TERM char *buf, ErlDrvUInt len Cancel an asynchronous call -

This function cancels an asynchronous operation, by removing - it from the queue. Only functions in the queue can be - cancelled; if a function is executing, it's too late to - cancel it. The async_free function is also called.

-

The return value is 1 if the operation was removed from the - queue, otherwise 0.

+

This function used to cancel a scheduled asynchronous operation, + if it was still in the queue. It returned 1 if it succeeded, and + 0 if it failed.

+

Since it could not guarantee success, it was more or less useless. + The user had to implement synchronization of cancellation anyway. + It also unnecessarily complicated the implementation. Therefore, + as of OTP-R15B driver_async_cancel() is deprecated, and + scheduled for removal in OTP-R16. It will currently always fail, + and return 0.

+

driver_async_cancel() is deferred and will + be removed in the OTP-R16 release.

+
+
-- cgit v1.2.3