Skip to content

Commit 6e3568c

Browse files
committed
docs: enhance event priority comments
Improved the explanation of libevent priority levels in the comments. Clarified the purpose of priorities 0 and 1 and added context on total priority configuration with `EVENT_BASE_PRIORITY_NUMBER`.
1 parent d6c732b commit 6e3568c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/Fast.xs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@ extern "C" {
2727

2828
#define MIN_ATTEMPT_TO_GET_RESULT 2
2929

30-
/* Event priorities:
31-
Priority 0: I/O events (highest priority) - Process Redis responses immediately
32-
Priority 1: Timer events (lower priority) - Handle timeouts after I/O processing */
30+
/* libevent adapter priority configuration
31+
Uses 2 priority levels to ensure I/O events are processed before timeouts:
32+
- Priority 0: I/O events (Redis responses) - highest priority
33+
- Priority 1: Timer events (timeouts) - lower priority
34+
EVENT_BASE_PRIORITY_NUMBER sets the total priorities for event_base_priority_init() */
3335
#define EVENT_BASE_PRIORITY_NUMBER 2
3436

3537
#define DEBUG_MSG(fmt, ...) \

0 commit comments

Comments
 (0)