mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-12-23 17:53:38 +08:00
d8ac0508f8
Today, debounce-style work items are only created from the main thread. The work to compute the result is done in a background thread but the completion callback is called on the main thread again. The completion callbacks used by the reader capture a shared reference to ReaderData, which includes a Parser. Neither of those types needs to be sent across threads. The debounce machinery moves the completion callback into a function object that is moved to the background thread and back again. Because of this there is a Send requirement on the completion callback. Since we already synchronize on MAIN_THREAD_QUEUE, we don't need Send from the function object. Lift the requirement. |
||
---|---|---|
.. | ||
src | ||
widestring-suffix | ||
build.rs |