File locking and DevelopmentService improvements (#358)
- Moved `file::getlock(path)` from `Tactility` to `TactilityCore` - Changed all existing `file::*` functions to implement locking by default - Removed all manual locking where `file::*` functions were used - When `DevelopmentService` receives a file, it doesn't try to allocate it all in memory. This fixes going out-of-memory on devices without PSRAM. - Fix for TactilityC include
This commit is contained in:
committed by
GitHub
parent
a05a6afaaf
commit
3802679de4
@@ -64,10 +64,8 @@ bool TextResources::load() {
|
||||
return false;
|
||||
}
|
||||
|
||||
file::withLock<void>(file_path, [&file_path, &new_data] {
|
||||
file::readLines(file_path, true, [&new_data](const char* line) {
|
||||
new_data.push_back(line);
|
||||
});
|
||||
file::readLines(file_path, true, [&new_data](const char* line) {
|
||||
new_data.push_back(line);
|
||||
});
|
||||
|
||||
if (new_data.empty()) {
|
||||
|
||||
Reference in New Issue
Block a user