diff --git a/lib/u_async.c b/lib/u_async.c index 3bb00dbc..87bfa81f 100644 --- a/lib/u_async.c +++ b/lib/u_async.c @@ -1511,31 +1511,6 @@ void uasync_destroy(struct UASYNC* ua, int close_fds) { socket_platform_cleanup(); } -void uasync_init_instance(struct UASYNC* ua) { - if (!ua) return; - - // Initialize socket array if not present - if (!ua->sockets) { - ua->sockets = socket_array_create(16); - } - - if (!ua->timeout_pool) { - ua->timeout_pool = memory_pool_init(sizeof(struct timeout_node)); - } - - if (!ua->immediate_queue_head) { - ua->immediate_queue_head = NULL; - ua->immediate_queue_tail = NULL; - } - - if (!ua->timeout_heap) { - ua->timeout_heap = timeout_heap_create(16); - if (ua->timeout_heap) { - timeout_heap_set_free_callback(ua->timeout_heap, ua, timeout_node_free_callback); - } - } -} - // Debug statistics void uasync_get_stats(struct UASYNC* ua, size_t* timer_alloc, size_t* timer_u_free, size_t* socket_alloc, size_t* socket_u_free) { if (!ua) return; diff --git a/lib/u_async.h b/lib/u_async.h index 1ce2038c..468057c8 100644 --- a/lib/u_async.h +++ b/lib/u_async.h @@ -77,7 +77,6 @@ typedef struct UASYNC UASYNC_t; // Instance API - основной API для работы с uasync struct UASYNC* uasync_create(void); void uasync_destroy(struct UASYNC* ua, int close_fds); -void uasync_init_instance(struct UASYNC* ua); // текущее время (timebase 0.1ms) uint64_t get_time_tb(void);