Go: removing request registry.
Passing unsafe.Pointers (void *) from Go to C is complicated by an attempt to make such pointers less unsafe. A straightforward optimization is to replace 'unsafe.Pointer' with 'uintptr' (thanks to Xin Huang for the idea: https://stackoverflow.com/a/44826533 ). As a result, request registry with mutex is gone.
This commit is contained in:
@@ -47,7 +47,8 @@ typedef struct {
|
||||
nxt_port_msg_t wport_msg;
|
||||
char wmmap_msg_buf[ sizeof(nxt_port_mmap_msg_t) * 8 ];
|
||||
|
||||
nxt_app_request_t r;
|
||||
nxt_app_request_t request;
|
||||
uintptr_t go_request;
|
||||
|
||||
nxt_go_msg_t *msg_last;
|
||||
} nxt_go_run_ctx_t;
|
||||
|
||||
Reference in New Issue
Block a user