Project

usleep

0.0
No commit activity in last 3 years
No release in over 3 years
A Ruby library that can execute a sleep while holding the Global VM Lock, which is pathological behavior that would normally be avoided in practice. However, having an easy method of blocking the Ruby VM from a thread is useful in certain debugging and simulation scenarios.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 12.3
~> 3.7
 Project Readme

Usleep

This Ruby gem provides a module with a single function: Usleep.sleep( )

This function sleeps for an integer amount of seconds in C code while holding the Ruby Global VM Lock (GVL). This is a worthless behavior that noone should allow in production code, but is useful in testing for simulating an operation that blocks other Ruby threads and is "uninterpretable" from other Ruby code once it begins.