mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-27 23:49:04 +00:00
reduce locking time in async_command_alloc
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
parent
78c8203f16
commit
a2ebe610c1
@ -335,9 +335,10 @@ static AsyncCommand *async_command_alloc(RedDispatcher *dispatcher,
|
||||
{
|
||||
AsyncCommand *async_command = spice_new0(AsyncCommand, 1);
|
||||
|
||||
pthread_mutex_lock(&dispatcher->async_lock);
|
||||
async_command->cookie = cookie;
|
||||
async_command->message = message;
|
||||
|
||||
pthread_mutex_lock(&dispatcher->async_lock);
|
||||
ring_add(&dispatcher->async_commands, &async_command->link);
|
||||
pthread_mutex_unlock(&dispatcher->async_lock);
|
||||
spice_debug("%p", async_command);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user