Antonio Scandurra and Nathan Sobo
8de18b5a84
Re-join channel when reconnecting
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-09-09 15:34:46 +02:00
Max Brunsfeld
c3e29e0a2d
Finish implementing DeterministicExecutor::advance_clock
...
* Start by running all non-timer futures to completion, to ensure that
timers have a chance to be registered.
* Release executor's state lock before waking any timers
2021-09-08 11:27:30 -07:00
Antonio Scandurra and Max Brunsfeld
900010160f
WIP
...
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2021-09-08 18:58:59 +02:00
Max Brunsfeld
08bac7b9a3
Introduce test-only Buffer::set_sync_parse_timeout
...
When testing buffer's asynchronous reparsing, set the sync
parse timeout to zero, so that we can exercise the async code path.
2021-09-07 16:23:49 -07:00
Antonio Scandurra and Nathan Sobo
98f691d16d
Make database interactions deterministic in test
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-08-20 16:24:33 +02:00
Antonio Scandurra
502f54a021
Don't poll foreground futures during DeterministicExecutor::block_on
2021-07-23 12:06:58 +02:00
Max Brunsfeld and Nathan Sobo
5d22c6c4bd
Start restructuring WrapMap with simpler concurrency
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-07-22 16:21:42 -07:00
Max Brunsfeld
d0fdc7b5e8
Get simple unit test passing for soft-wrap in DisplayMap
2021-07-20 15:22:11 -07:00
Max Brunsfeld and Nathan Sobo
61397f2f2f
Avoid holding executor's state lock while parked
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-07-20 11:37:02 -07:00
Nathan Sobo and Max Brunsfeld
ee213696aa
Replace DeterministicExecutor::reset with forbid_parking
...
There's really no point calling reset if we plan on parking afterwards.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-07-20 12:28:04 -06:00
Nathan Sobo
64927abbc4
Allow DeterministicExecutor to park until forbid_parking is called
...
This allows us to perform async setup such as talking to the database.
2021-07-20 12:22:02 -06:00
3d3a14b650
Add DeterministicExecutor::block_on(duration, future)
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2021-07-20 19:20:50 +02:00
2e645bcf6a
Use an unbounded channel for waking executor::Deterministic
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2021-07-13 18:46:48 +02:00
c4e37dc47c
Use the same background executor for spawning CPU intensive tasks
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2021-07-13 18:13:25 +02:00
Antonio Scandurra
68f747d6df
Allow printing a trace of a run of the executor
2021-07-13 12:31:36 +02:00
Antonio Scandurra
1813a3cc91
Allow resetting executor::Deterministic's RNG
2021-07-11 11:26:06 +02:00
4f4233e00b
Schedule foreground-spawned futures sequentially
...
Co-Authored-By: Max Brunsfeld <max@zed.dev >
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-07-09 18:55:42 +02:00
Antonio Scandurra
13c56cf6ce
WIP
2021-07-09 18:32:57 +02:00
Antonio Scandurra
102026f3c7
Implement a scoped pool on executor::Background
2021-07-09 15:00:51 +02:00
Max Brunsfeld
2965fce70d
Avoid panic when spawn is called after run exits in deterministic executor
2021-07-08 17:38:54 -07:00
Max Brunsfeld and Nathan Sobo
140c8833fe
Start work on a deterministic executor for tests
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-07-08 13:39:24 -07:00
Max Brunsfeld and Antonio Scandurra
86ff599285
Use tiny_http for handling login HTTP request
...
Our manual HTTP parsing and encoding was not working with Safari.
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2021-06-11 10:28:00 -07:00
Max Brunsfeld and Nathan Sobo
fda1394057
Rename Task -> EntityTask (a BackgroundTask is just a Task)
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-04-05 17:03:42 -07:00
Nathan Sobo and Max Brunsfeld
914cf37f37
Remove executor::ForegroundTask wrapper
...
Now that smol returns the same Task as async_task, we can simply re-export the async_task::Task struct from our executor module.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-04-02 11:02:09 -06:00
Nathan Sobo and Antonio Scandurra
0c59937a65
Wire up events and fix synthetic dragging
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2021-03-21 09:44:14 -06:00
Nathan Sobo
e809d6119a
Return tasks from spawn and spawn_stream
...
Also, eliminate the background spawning methods. We can spawn futures
on the executor and then spawn those on the app if we need to wait for
the result of running one.
2021-03-18 20:10:32 -06:00
Nathan Sobo
222f9d373d
WIP
2021-02-20 16:05:36 -07:00