|
@@ -265,9 +265,10 @@ HV_EXPORT int hio_read (hio_t* io);
|
|
|
// NOTE: hio_write is thread-safe, locked by recursive_mutex, allow to be called by other threads.
|
|
// NOTE: hio_write is thread-safe, locked by recursive_mutex, allow to be called by other threads.
|
|
|
// hio_try_write => hio_add(io, HV_WRITE) => write => hwrite_cb
|
|
// hio_try_write => hio_add(io, HV_WRITE) => write => hwrite_cb
|
|
|
HV_EXPORT int hio_write (hio_t* io, const void* buf, size_t len);
|
|
HV_EXPORT int hio_write (hio_t* io, const void* buf, size_t len);
|
|
|
-// NOTE: hio_close is thread-safe, if called by other thread, hloop_post_event(hio_close_event).
|
|
|
|
|
|
|
+// NOTE: hio_close is thread-safe, hio_close_async will be called actually in other thread.
|
|
|
// hio_del(io, HV_RDWR) => close => hclose_cb
|
|
// hio_del(io, HV_RDWR) => close => hclose_cb
|
|
|
HV_EXPORT int hio_close (hio_t* io);
|
|
HV_EXPORT int hio_close (hio_t* io);
|
|
|
|
|
+// NOTE: hloop_post_event(hio_close_event)
|
|
|
HV_EXPORT int hio_close_async(hio_t* io);
|
|
HV_EXPORT int hio_close_async(hio_t* io);
|
|
|
|
|
|
|
|
//------------------high-level apis-------------------------------------------
|
|
//------------------high-level apis-------------------------------------------
|