mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-25 12:43:09 +00:00
skynet_context: skynet_context_new 改为返回 handle 避免调用者拿到悬垂指针 (#2095)
* skynet_context: skynet_context_new 改为返回 handle 避免调用者拿到悬垂指针 * 推迟 skynet_handle_grab(logger_handle) 到 bootstrap 失败阶段 --------- Co-authored-by: efve.zff <efve.zff@alibaba-inc.com>
This commit is contained in:
@@ -8,10 +8,10 @@ struct skynet_context;
|
||||
struct skynet_message;
|
||||
struct skynet_monitor;
|
||||
|
||||
struct skynet_context * skynet_context_new(const char * name, const char * parm);
|
||||
uint32_t skynet_context_new(const char * name, const char * parm);
|
||||
void skynet_context_grab(struct skynet_context *);
|
||||
void skynet_context_reserve(struct skynet_context *ctx);
|
||||
struct skynet_context * skynet_context_release(struct skynet_context *);
|
||||
void skynet_context_release(struct skynet_context *);
|
||||
uint32_t skynet_context_handle(struct skynet_context *);
|
||||
int skynet_context_push(uint32_t handle, struct skynet_message *message);
|
||||
void skynet_context_send(struct skynet_context * context, void * msg, size_t sz, uint32_t source, int type, int session);
|
||||
|
||||
Reference in New Issue
Block a user