blob: f1f4e88f50e18f2c7a6c299d7e52aa2adc8f31ce [file]
/-
Copyright (c) 2025 Lean FRO, LLC. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sofia Rodrigues
-/
module
prelude
public import Init.System.Promise
@[expose] public section
namespace Std
namespace Internal
namespace UV
namespace Loop
/--
Options for configuring the event loop behavior.
-/
structure Options where
/--
Accumulate the amount of idle time the event loop spends in the event provider.
-/
accumulateIdleTime : Bool := False
/--
Block a SIGPROF signal when polling for new events. It's commonly used for unnecessary wakeups
when using a sampling profiler.
-/
blockSigProfSignal : Bool := False
/--
Configures the event loop with the specified options.
-/
@[extern "lean_uv_event_loop_configure"]
opaque configure (options : @& Options) : IO Unit
/--
Checks if the event loop has pending work, i.e. an active handle or an in-flight request.
-/
@[extern "lean_uv_event_loop_alive"]
opaque alive : BaseIO Bool
end Loop
end UV
end Internal
end Std