mirror of
https://github.com/neovim/neovim.git
synced 2024-12-24 13:15:09 -07:00
5e569a4703
Here's the headline: when run in sync mode (last argument cb=NULL), these functions don't actually use the uv_loop_t. An earlier version of this patch instead replaced fs_loop with using main_loop.uv on the main thread and luv_loop() on luv worker threads. However this made the code more complicated for no reason. Also arbitrarily, half of these functions would attempt to handle UV_ENOMEM by try_to_free_memory(). This would mostly happen on windows because it needs to allocate a converted WCHAR buffer. This should be a quite rare situation. Your system is pretty much hosed already if you cannot allocate like 50 WCHAR:s. Therefore, take the liberty of simply removing this fallback. In addition, we tried to "recover" from ENOMEM in read()/readv() this way which doesn't make any sense. The read buffer(s) are already allocated at this point. This would also be an issue when using these functions on a worker thread, as try_to_free_memory() is not thread-safe. Currently os_file_is_readable() and os_is_dir() is used by worker threads (as part of nvim__get_runtime(), to implement require from 'rtp' in threads). In the end, these changes makes _all_ os/fs.c functions thread-safe, and we thus don't need to document and maintain a thread-safe subset. |
||
---|---|---|
.. | ||
api | ||
charset | ||
eval | ||
fixtures | ||
os | ||
viml | ||
buffer_spec.lua | ||
fileio_spec.lua | ||
formatc.lua | ||
garray_spec.lua | ||
helpers.lua | ||
indent_spec.lua | ||
keycodes_spec.lua | ||
marktree_spec.lua | ||
mbyte_spec.lua | ||
memory_spec.lua | ||
message_spec.lua | ||
multiqueue_spec.lua | ||
optionstr_spec.lua | ||
path_spec.lua | ||
preload.lua | ||
preprocess.lua | ||
profile_spec.lua | ||
rbuffer_spec.lua | ||
search_spec.lua | ||
set.lua | ||
strings_spec.lua | ||
tempfile_spec.lua | ||
testtest_spec.lua | ||
tui_spec.lua | ||
undo_spec.lua |