Properly unlock mutex
This commit is contained in:
parent
8c923fc617
commit
a32f020b53
|
@ -406,8 +406,10 @@ class CommandQueueMT {
|
||||||
tryagain:
|
tryagain:
|
||||||
|
|
||||||
// tried to read an empty queue
|
// tried to read an empty queue
|
||||||
if (read_ptr == write_ptr)
|
if (read_ptr == write_ptr) {
|
||||||
|
if (p_lock) unlock();
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
uint32_t size_ptr = read_ptr;
|
uint32_t size_ptr = read_ptr;
|
||||||
uint32_t size = *(uint32_t *)&command_mem[read_ptr] >> 1;
|
uint32_t size = *(uint32_t *)&command_mem[read_ptr] >> 1;
|
||||||
|
|
|
@ -118,8 +118,11 @@ void FileAccessNetworkClient::_thread_func() {
|
||||||
FileAccessNetwork *fa = NULL;
|
FileAccessNetwork *fa = NULL;
|
||||||
|
|
||||||
if (response != FileAccessNetwork::RESPONSE_DATA) {
|
if (response != FileAccessNetwork::RESPONSE_DATA) {
|
||||||
|
if (!accesses.has(id)) {
|
||||||
|
unlock_mutex();
|
||||||
ERR_FAIL_COND(!accesses.has(id));
|
ERR_FAIL_COND(!accesses.has(id));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (accesses.has(id))
|
if (accesses.has(id))
|
||||||
fa = accesses[id];
|
fa = accesses[id];
|
||||||
|
|
|
@ -68,8 +68,8 @@ void remove_print_handler(PrintHandlerList *p_handler) {
|
||||||
}
|
}
|
||||||
//OS::get_singleton()->print("print handler list is %p\n",print_handler_list);
|
//OS::get_singleton()->print("print handler list is %p\n",print_handler_list);
|
||||||
|
|
||||||
ERR_FAIL_COND(l == NULL);
|
|
||||||
_global_unlock();
|
_global_unlock();
|
||||||
|
ERR_FAIL_COND(l == NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void print_line(String p_string) {
|
void print_line(String p_string) {
|
||||||
|
|
Loading…
Reference in New Issue