summaryrefslogtreecommitdiff
path: root/thread_none.c
diff options
context:
space:
mode:
authorAaron Patterson <[email protected]>2024-11-01 15:06:35 -0700
committerAaron Patterson <[email protected]>2024-12-12 16:04:49 -0800
commitfffef9aa5d89b6cca3dc634f5278b1fc67fb3d08 (patch)
tree600f63118e7ef716d183b2894e918febcdeb3c49 /thread_none.c
parente7ee7d43f3d22f499845ee2c8c420201d6b453a3 (diff)
Add an environment variable for controlling the default Thread quantum
This commit adds an environment variable `RUBY_THREAD_TIMESLICE` for specifying the default thread quantum in milliseconds. You can adjust this variable to tune throughput, which is especially useful on multithreaded systems that are mixing CPU bound work and IO bound work. The default quantum remains 100ms. [Feature #20861] Co-Authored-By: John Hawthorn <[email protected]>
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/11981
Diffstat (limited to 'thread_none.c')
-rw-r--r--thread_none.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/thread_none.c b/thread_none.c
index 1582609821..8d32aaabee 100644
--- a/thread_none.c
+++ b/thread_none.c
@@ -19,10 +19,6 @@
# include "wasm/machine.h"
#endif
-#define TIME_QUANTUM_MSEC (100)
-#define TIME_QUANTUM_USEC (TIME_QUANTUM_MSEC * 1000)
-#define TIME_QUANTUM_NSEC (TIME_QUANTUM_USEC * 1000)
-
// Do nothing for GVL
static void
thread_sched_to_running(struct rb_thread_sched *sched, rb_thread_t *th)