You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do not poll when omitting timeout values for the monitor scanner.
Previously, it would default to use a 0 s timeout, which for select means that
it doesn't block (it would poll continuously and waste CPU). This change
unifies the make-udev-monitor/udev-monitor-set-timeout! interface with that of
Guile's select procedure.
* NEWS: Update news.
* doc/guile-udev.texi (API Reference): Update doc.
* examples/device-listener.scm (main)
<make-udev-monitor>: Remove timeout arguments.
* libguile-udev/udev-monitor-func.c
(udev-monitor-set-timeout!): Make timeout arguments optional. Update doc.
Streamline definition, removing all arguments validation, which is now handled
by scm_select.
* libguile-udev/udev-monitor-func.c (select_args_data): New struct.
(call_select, false_on_exception): New procedures.
(udev_monitor_scanner): Replace C select call with scm_select call, adjusting
the rest accordingly.
* libguile-udev/udev-monitor-type.h: Replace timeout member with new 'secs'
and 'usecs' ones.
* libguile-udev/udev-monitor-type.c (gudev_monitor_to_scm): Set default values
of secs and usecs to SCM_BOOL_F.
* modules/udev/monitor.scm (make-udev-monitor): Do not specify default values
for filter, timeout-sec and timeout-usec keyword arguments. Update doc.
Fixes: #5
0 commit comments