From ef43aa02679aac496282c021b110aadb262cc69a Mon Sep 17 00:00:00 2001 From: James Booth Date: Tue, 5 Jul 2016 23:16:34 +0100 Subject: [PATCH] C test: cancel thread on unload --- tests/python-test.py | 2 +- tests/test-c-plugin/test-c-plugin.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/python-test.py b/tests/python-test.py index 422f1a1..2210c0d 100644 --- a/tests/python-test.py +++ b/tests/python-test.py @@ -457,7 +457,7 @@ def prof_init(version, status, account_name, fulljid): [ "add", "remove" ] ) - prof.register_timed(timed_callback, 30) + prof.register_timed(timed_callback, 5) def prof_on_start(): diff --git a/tests/test-c-plugin/test-c-plugin.c b/tests/test-c-plugin/test-c-plugin.c index 14fc346..479e335 100644 --- a/tests/test-c-plugin/test-c-plugin.c +++ b/tests/test-c-plugin/test-c-plugin.c @@ -609,7 +609,7 @@ prof_init(const char * const version, const char * const status, const char *con char *completer_ac[] = { "add", "remove", NULL }; prof_completer_add("/c-test completer", completer_ac); - prof_register_timed(timed_callback, 30); + prof_register_timed(timed_callback, 5); } void @@ -631,6 +631,7 @@ prof_on_unload(void) { create_win(); prof_win_show(plugin_win, "fired -> prof_on_unload"); + pthread_cancel(worker_thread); } void