Loading workspace insights... Statistics interval
7 days30 daysLatest CI Pipeline Executions
95d42d43 cleanup(core): hand watcher session to a self-contained flush loop
Refactors the watcher's threading model so the flush loop owns
everything it needs and the Watcher struct only holds the bits the
outside world talks to.
Before, the calling thread created the filterer and notify watcher,
wrapped the watcher in Arc<Mutex<>> so the spawned thread could
register new directory watches, then handed both to the thread. The
struct kept a notify_watcher field purely to keep the FSEvents channel
sender alive on macOS (a workaround for the closure not capturing the
watcher when no cfg-active references referenced it on darwin).
Now the flush loop creates the filterer and notify watcher locally on
its own stack, registers watch paths, signals readiness via a oneshot
channel, and then runs a crossbeam_channel::select! loop:
- notify_rx (internal to the loop) carries notify events.
- force_flush_rx (struct holds the tx) carries force-flush requests.
- default(deadline) drives the IDLE_WINDOW + MAX_WAIT debounce.
Shutdown is now implicit. When the Watcher struct drops or stop() is
called, the only external sender (the force-flush tx) drops; the
loop's force_flush_rx select arm reports Disconnected and the loop
exits at most one debounce window later. The notify watcher drops
with the loop's stack, releasing the OS subscription. No more
stop_flag, no more SHUTDOWN_POLL, no more Drop impl, no more
Arc<Mutex<>>, no more notify_watcher field on the struct.
The struct collapses to:
- origin / additional_globs / use_ignore (config the loop reads at
startup)
- force_flush_tx: Mutex<Option<Sender<...>>> (interior mutability so
stop() can drop the sender via &self)
Other touch-ups:
- ProcMsg enum gone — separate channels carry separate concerns.
- EventIngestor no longer holds the watcher; the Linux/Windows
new-directory backfill takes &mut watcher as a parameter on ingest.
- register_watches/register_and_backfill_new_dirs take &mut watcher
directly; no more Mutex locking.
- Imports collapsed into multi-item use statements.
All 10 watcher tests still pass through the public Watcher API. 95d42d43 cleanup(core): hand watcher session to a self-contained flush loop
Refactors the watcher's threading model so the flush loop owns
everything it needs and the Watcher struct only holds the bits the
outside world talks to.
Before, the calling thread created the filterer and notify watcher,
wrapped the watcher in Arc<Mutex<>> so the spawned thread could
register new directory watches, then handed both to the thread. The
struct kept a notify_watcher field purely to keep the FSEvents channel
sender alive on macOS (a workaround for the closure not capturing the
watcher when no cfg-active references referenced it on darwin).
Now the flush loop creates the filterer and notify watcher locally on
its own stack, registers watch paths, signals readiness via a oneshot
channel, and then runs a crossbeam_channel::select! loop:
- notify_rx (internal to the loop) carries notify events.
- force_flush_rx (struct holds the tx) carries force-flush requests.
- default(deadline) drives the IDLE_WINDOW + MAX_WAIT debounce.
Shutdown is now implicit. When the Watcher struct drops or stop() is
called, the only external sender (the force-flush tx) drops; the
loop's force_flush_rx select arm reports Disconnected and the loop
exits at most one debounce window later. The notify watcher drops
with the loop's stack, releasing the OS subscription. No more
stop_flag, no more SHUTDOWN_POLL, no more Drop impl, no more
Arc<Mutex<>>, no more notify_watcher field on the struct.
The struct collapses to:
- origin / additional_globs / use_ignore (config the loop reads at
startup)
- force_flush_tx: Mutex<Option<Sender<...>>> (interior mutability so
stop() can drop the sender via &self)
Other touch-ups:
- ProcMsg enum gone — separate channels carry separate concerns.
- EventIngestor no longer holds the watcher; the Linux/Windows
new-directory backfill takes &mut watcher as a parameter on ingest.
- register_watches/register_and_backfill_new_dirs take &mut watcher
directly; no more Mutex locking.
- Imports collapsed into multi-item use statements.
All 10 watcher tests still pass through the public Watcher API. 95d42d43 cleanup(core): hand watcher session to a self-contained flush loop
Refactors the watcher's threading model so the flush loop owns
everything it needs and the Watcher struct only holds the bits the
outside world talks to.
Before, the calling thread created the filterer and notify watcher,
wrapped the watcher in Arc<Mutex<>> so the spawned thread could
register new directory watches, then handed both to the thread. The
struct kept a notify_watcher field purely to keep the FSEvents channel
sender alive on macOS (a workaround for the closure not capturing the
watcher when no cfg-active references referenced it on darwin).
Now the flush loop creates the filterer and notify watcher locally on
its own stack, registers watch paths, signals readiness via a oneshot
channel, and then runs a crossbeam_channel::select! loop:
- notify_rx (internal to the loop) carries notify events.
- force_flush_rx (struct holds the tx) carries force-flush requests.
- default(deadline) drives the IDLE_WINDOW + MAX_WAIT debounce.
Shutdown is now implicit. When the Watcher struct drops or stop() is
called, the only external sender (the force-flush tx) drops; the
loop's force_flush_rx select arm reports Disconnected and the loop
exits at most one debounce window later. The notify watcher drops
with the loop's stack, releasing the OS subscription. No more
stop_flag, no more SHUTDOWN_POLL, no more Drop impl, no more
Arc<Mutex<>>, no more notify_watcher field on the struct.
The struct collapses to:
- origin / additional_globs / use_ignore (config the loop reads at
startup)
- force_flush_tx: Mutex<Option<Sender<...>>> (interior mutability so
stop() can drop the sender via &self)
Other touch-ups:
- ProcMsg enum gone — separate channels carry separate concerns.
- EventIngestor no longer holds the watcher; the Linux/Windows
new-directory backfill takes &mut watcher as a parameter on ingest.
- register_watches/register_and_backfill_new_dirs take &mut watcher
directly; no more Mutex locking.
- Imports collapsed into multi-item use statements.
All 10 watcher tests still pass through the public Watcher API. 95d42d43 cleanup(core): hand watcher session to a self-contained flush loop
Refactors the watcher's threading model so the flush loop owns
everything it needs and the Watcher struct only holds the bits the
outside world talks to.
Before, the calling thread created the filterer and notify watcher,
wrapped the watcher in Arc<Mutex<>> so the spawned thread could
register new directory watches, then handed both to the thread. The
struct kept a notify_watcher field purely to keep the FSEvents channel
sender alive on macOS (a workaround for the closure not capturing the
watcher when no cfg-active references referenced it on darwin).
Now the flush loop creates the filterer and notify watcher locally on
its own stack, registers watch paths, signals readiness via a oneshot
channel, and then runs a crossbeam_channel::select! loop:
- notify_rx (internal to the loop) carries notify events.
- force_flush_rx (struct holds the tx) carries force-flush requests.
- default(deadline) drives the IDLE_WINDOW + MAX_WAIT debounce.
Shutdown is now implicit. When the Watcher struct drops or stop() is
called, the only external sender (the force-flush tx) drops; the
loop's force_flush_rx select arm reports Disconnected and the loop
exits at most one debounce window later. The notify watcher drops
with the loop's stack, releasing the OS subscription. No more
stop_flag, no more SHUTDOWN_POLL, no more Drop impl, no more
Arc<Mutex<>>, no more notify_watcher field on the struct.
The struct collapses to:
- origin / additional_globs / use_ignore (config the loop reads at
startup)
- force_flush_tx: Mutex<Option<Sender<...>>> (interior mutability so
stop() can drop the sender via &self)
Other touch-ups:
- ProcMsg enum gone — separate channels carry separate concerns.
- EventIngestor no longer holds the watcher; the Linux/Windows
new-directory backfill takes &mut watcher as a parameter on ingest.
- register_watches/register_and_backfill_new_dirs take &mut watcher
directly; no more Mutex locking.
- Imports collapsed into multi-item use statements.
All 10 watcher tests still pass through the public Watcher API. 95d42d43 cleanup(core): hand watcher session to a self-contained flush loop
Refactors the watcher's threading model so the flush loop owns
everything it needs and the Watcher struct only holds the bits the
outside world talks to.
Before, the calling thread created the filterer and notify watcher,
wrapped the watcher in Arc<Mutex<>> so the spawned thread could
register new directory watches, then handed both to the thread. The
struct kept a notify_watcher field purely to keep the FSEvents channel
sender alive on macOS (a workaround for the closure not capturing the
watcher when no cfg-active references referenced it on darwin).
Now the flush loop creates the filterer and notify watcher locally on
its own stack, registers watch paths, signals readiness via a oneshot
channel, and then runs a crossbeam_channel::select! loop:
- notify_rx (internal to the loop) carries notify events.
- force_flush_rx (struct holds the tx) carries force-flush requests.
- default(deadline) drives the IDLE_WINDOW + MAX_WAIT debounce.
Shutdown is now implicit. When the Watcher struct drops or stop() is
called, the only external sender (the force-flush tx) drops; the
loop's force_flush_rx select arm reports Disconnected and the loop
exits at most one debounce window later. The notify watcher drops
with the loop's stack, releasing the OS subscription. No more
stop_flag, no more SHUTDOWN_POLL, no more Drop impl, no more
Arc<Mutex<>>, no more notify_watcher field on the struct.
The struct collapses to:
- origin / additional_globs / use_ignore (config the loop reads at
startup)
- force_flush_tx: Mutex<Option<Sender<...>>> (interior mutability so
stop() can drop the sender via &self)
Other touch-ups:
- ProcMsg enum gone — separate channels carry separate concerns.
- EventIngestor no longer holds the watcher; the Linux/Windows
new-directory backfill takes &mut watcher as a parameter on ingest.
- register_watches/register_and_backfill_new_dirs take &mut watcher
directly; no more Mutex locking.
- Imports collapsed into multi-item use statements.
All 10 watcher tests still pass through the public Watcher API. 95d42d43 cleanup(core): hand watcher session to a self-contained flush loop
Refactors the watcher's threading model so the flush loop owns
everything it needs and the Watcher struct only holds the bits the
outside world talks to.
Before, the calling thread created the filterer and notify watcher,
wrapped the watcher in Arc<Mutex<>> so the spawned thread could
register new directory watches, then handed both to the thread. The
struct kept a notify_watcher field purely to keep the FSEvents channel
sender alive on macOS (a workaround for the closure not capturing the
watcher when no cfg-active references referenced it on darwin).
Now the flush loop creates the filterer and notify watcher locally on
its own stack, registers watch paths, signals readiness via a oneshot
channel, and then runs a crossbeam_channel::select! loop:
- notify_rx (internal to the loop) carries notify events.
- force_flush_rx (struct holds the tx) carries force-flush requests.
- default(deadline) drives the IDLE_WINDOW + MAX_WAIT debounce.
Shutdown is now implicit. When the Watcher struct drops or stop() is
called, the only external sender (the force-flush tx) drops; the
loop's force_flush_rx select arm reports Disconnected and the loop
exits at most one debounce window later. The notify watcher drops
with the loop's stack, releasing the OS subscription. No more
stop_flag, no more SHUTDOWN_POLL, no more Drop impl, no more
Arc<Mutex<>>, no more notify_watcher field on the struct.
The struct collapses to:
- origin / additional_globs / use_ignore (config the loop reads at
startup)
- force_flush_tx: Mutex<Option<Sender<...>>> (interior mutability so
stop() can drop the sender via &self)
Other touch-ups:
- ProcMsg enum gone — separate channels carry separate concerns.
- EventIngestor no longer holds the watcher; the Linux/Windows
new-directory backfill takes &mut watcher as a parameter on ingest.
- register_watches/register_and_backfill_new_dirs take &mut watcher
directly; no more Mutex locking.
- Imports collapsed into multi-item use statements.
All 10 watcher tests still pass through the public Watcher API. 95d42d43 cleanup(core): hand watcher session to a self-contained flush loop
Refactors the watcher's threading model so the flush loop owns
everything it needs and the Watcher struct only holds the bits the
outside world talks to.
Before, the calling thread created the filterer and notify watcher,
wrapped the watcher in Arc<Mutex<>> so the spawned thread could
register new directory watches, then handed both to the thread. The
struct kept a notify_watcher field purely to keep the FSEvents channel
sender alive on macOS (a workaround for the closure not capturing the
watcher when no cfg-active references referenced it on darwin).
Now the flush loop creates the filterer and notify watcher locally on
its own stack, registers watch paths, signals readiness via a oneshot
channel, and then runs a crossbeam_channel::select! loop:
- notify_rx (internal to the loop) carries notify events.
- force_flush_rx (struct holds the tx) carries force-flush requests.
- default(deadline) drives the IDLE_WINDOW + MAX_WAIT debounce.
Shutdown is now implicit. When the Watcher struct drops or stop() is
called, the only external sender (the force-flush tx) drops; the
loop's force_flush_rx select arm reports Disconnected and the loop
exits at most one debounce window later. The notify watcher drops
with the loop's stack, releasing the OS subscription. No more
stop_flag, no more SHUTDOWN_POLL, no more Drop impl, no more
Arc<Mutex<>>, no more notify_watcher field on the struct.
The struct collapses to:
- origin / additional_globs / use_ignore (config the loop reads at
startup)
- force_flush_tx: Mutex<Option<Sender<...>>> (interior mutability so
stop() can drop the sender via &self)
Other touch-ups:
- ProcMsg enum gone — separate channels carry separate concerns.
- EventIngestor no longer holds the watcher; the Linux/Windows
new-directory backfill takes &mut watcher as a parameter on ingest.
- register_watches/register_and_backfill_new_dirs take &mut watcher
directly; no more Mutex locking.
- Imports collapsed into multi-item use statements.
All 10 watcher tests still pass through the public Watcher API.