Skip to content

Commit

Permalink
Merge pull request #110 from monich/binder-test
Browse files Browse the repository at this point in the history
Refactor binder simulation used by unit tests
  • Loading branch information
monich authored Jan 4, 2023
2 parents 98ad09e + d7eacd4 commit 38f156a
Show file tree
Hide file tree
Showing 22 changed files with 1,586 additions and 1,853 deletions.
9 changes: 6 additions & 3 deletions src/gbinder_ipc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2194,7 +2194,6 @@ gbinder_ipc_exit()
for (i = ipcs; i; i = i->next) {
GBinderIpc* ipc = THIS(i->data);
GBinderIpcPriv* priv = ipc->priv;
GThreadPool* pool = priv->tx_pool;
GSList* local_objs = NULL;
GSList* tx_keys = NULL;
GSList* k;
Expand All @@ -2205,8 +2204,12 @@ gbinder_ipc_exit()
gbinder_ipc_stop_loopers(ipc);

/* Make sure pooled transaction complete too */
priv->tx_pool = NULL;
g_thread_pool_free(pool, FALSE, TRUE);
if (priv->tx_pool) {
GThreadPool* pool = priv->tx_pool;

priv->tx_pool = NULL;
g_thread_pool_free(pool, FALSE, TRUE);
}

/*
* Since this function is supposed to be invoked on the main thread,
Expand Down
Loading

0 comments on commit 38f156a

Please sign in to comment.