Antonio Scandurra and Nathan Sobo
aac9f00b65
Re-join channel when reconnecting
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-09-09 15:34:46 +02:00
Max Brunsfeld
45817a7841
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
c3948e9d38
WIP
...
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2021-09-08 18:58:59 +02:00
Max Brunsfeld
efea1cb04b
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
555d5132b7
Make database interactions deterministic in test
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-08-20 16:24:33 +02:00
Antonio Scandurra
e93eed360f
Don't poll foreground futures during DeterministicExecutor::block_on
2021-07-23 12:06:58 +02:00
Max Brunsfeld and Nathan Sobo
ebc986a0e2
Start restructuring WrapMap with simpler concurrency
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-07-22 16:21:42 -07:00
Max Brunsfeld
c4d825cf33
Get simple unit test passing for soft-wrap in DisplayMap
2021-07-20 15:22:11 -07:00
Max Brunsfeld and Nathan Sobo
e8d2dda42f
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
31d248318a
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
e438010a18
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
7efff39465
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
4634097115
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
bf172f29f2
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
350e3f03fb
Allow printing a trace of a run of the executor
2021-07-13 12:31:36 +02:00
Antonio Scandurra
2a03d86543
Allow resetting executor::Deterministic's RNG
2021-07-11 11:26:06 +02:00
4cf78fc333
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
65a8c36613
WIP
2021-07-09 18:32:57 +02:00
Antonio Scandurra
c500621d4a
Implement a scoped pool on executor::Background
2021-07-09 15:00:51 +02:00
Max Brunsfeld
3b13c99e6c
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
a080b03ac7
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
d77b3268da
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
4d7726501e
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
1dc03bab2b
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