diff options
author | Vladimir Chtchetkine <vchtchetkine@google.com> | 2012-04-03 10:27:12 -0700 |
---|---|---|
committer | Vladimir Chtchetkine <vchtchetkine@google.com> | 2012-04-03 16:13:42 -0700 |
commit | ef4ccd385650612a830a098f4b1eac48482b65b3 (patch) | |
tree | dad74ea321507a3a0912a0142387e8df3bff901f /android/async-utils.h | |
parent | 6dc5c2cef91004488f04fc6e9c0946f6d3a29705 (diff) | |
download | external_qemu-ef4ccd385650612a830a098f4b1eac48482b65b3.zip external_qemu-ef4ccd385650612a830a098f4b1eac48482b65b3.tar.gz external_qemu-ef4ccd385650612a830a098f4b1eac48482b65b3.tar.bz2 |
Make all async I/O object referenced.
Since it's hard to control lifespan of an object in asynchronous environment, we
should make all AsyncXxx objects a referenced objecst, that will self-destruct
when its reference count drops to zero, indicating that the last client that
used the object has abandoned it.
Change-Id: I6f8194aa14e52a23a8772d827583782989654504
Diffstat (limited to 'android/async-utils.h')
-rw-r--r-- | android/async-utils.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/android/async-utils.h b/android/async-utils.h index 6d460c2..30dfbe3 100644 --- a/android/async-utils.h +++ b/android/async-utils.h @@ -225,4 +225,12 @@ asyncConnector_init(AsyncConnector* ac, AsyncStatus asyncConnector_run(AsyncConnector* ac); +/* Stops connection in progress. + * Return: + * 0 if connection in progress has been stopped, or -1 if no connection has been + * in progress. + */ +int +asyncConnector_stop(AsyncConnector* ac); + #endif /* ANDROID_ASYNC_UTILS_H */ |