We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5415a6b commit fdd0f9dCopy full SHA for fdd0f9d
fibjs/include/UVStream.h
@@ -52,6 +52,26 @@ class UVStream : public Stream_base {
52
});
53
}
54
55
+ static void on_delete(uv_handle_t* handle)
56
+ {
57
+ UVStream* pThis = container_of(handle, UVStream, m_pipe);
58
+ delete pThis;
59
+ }
60
+
61
+ virtual void Delete()
62
63
+ result_t hr = uv_call([&] {
64
+ if (uv_is_closing((uv_handle_t*)&m_pipe))
65
+ return CALL_E_INVALID_CALL;
66
67
+ uv_close((uv_handle_t*)&m_pipe, on_delete);
68
+ return CALL_E_PENDDING;
69
+ });
70
71
+ if (hr != CALL_E_PENDDING)
72
+ delete this;
73
74
75
public:
76
// Stream_base
77
class AsyncRead : public AsyncEvent {
0 commit comments