Commit ad09e1e4 authored by Shane Snyder's avatar Shane Snyder

bug workaround for lifetime of hg_handles

parent fb03faab
......@@ -927,6 +927,7 @@ void __name##_wrapper(hg_handle_t handle) { \
__name(handle); \
margo_instance_id __mid; \
__mid = margo_hg_handle_get_instance(handle); \
margo_destroy(handle); \
__margo_internal_decr_pending(__mid); \
if(__margo_internal_finalize_requested(__mid)) { \
margo_finalize(__mid); \
......@@ -941,6 +942,7 @@ hg_return_t __name##_handler(hg_handle_t handle) { \
if(__margo_internal_finalize_requested(__mid)) { return(HG_CANCELED); } \
__pool = margo_hg_handle_get_handler_pool(handle); \
__margo_internal_incr_pending(__mid); \
margo_ref_incr(handle); \
__ret = ABT_thread_create(__pool, (void (*)(void *))__name##_wrapper, handle, ABT_THREAD_ATTR_NULL, NULL); \
if(__ret != 0) { \
return(HG_NOMEM_ERROR); \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment