diff options
author | nobody <nobody@localhost> | 2000-05-22 06:40:15 +0800 |
---|---|---|
committer | nobody <nobody@localhost> | 2000-05-22 06:40:15 +0800 |
commit | de2d358926885856d43a5f53aecb3739a9b5f3c8 (patch) | |
tree | 70ea22d6a4da2e07bedfe85a5cddc5e7ad0a1246 /tests/test8.c | |
parent | 3f5d9cb60827ca2a5e032e95aa241cc8376ab46f (diff) | |
download | gsoc2013-evolution-de2d358926885856d43a5f53aecb3739a9b5f3c8.tar gsoc2013-evolution-de2d358926885856d43a5f53aecb3739a9b5f3c8.tar.gz gsoc2013-evolution-de2d358926885856d43a5f53aecb3739a9b5f3c8.tar.bz2 gsoc2013-evolution-de2d358926885856d43a5f53aecb3739a9b5f3c8.tar.lz gsoc2013-evolution-de2d358926885856d43a5f53aecb3739a9b5f3c8.tar.xz gsoc2013-evolution-de2d358926885856d43a5f53aecb3739a9b5f3c8.tar.zst gsoc2013-evolution-de2d358926885856d43a5f53aecb3739a9b5f3c8.zip |
This commit was manufactured by cvs2svn to create tag 'gnomoku-0_3'.gnomoku-0_3
svn path=/tags/gnomoku-0_3/; revision=3161
Diffstat (limited to 'tests/test8.c')
-rw-r--r-- | tests/test8.c | 75 |
1 files changed, 0 insertions, 75 deletions
diff --git a/tests/test8.c b/tests/test8.c deleted file mode 100644 index aa7debdba9..0000000000 --- a/tests/test8.c +++ /dev/null @@ -1,75 +0,0 @@ -/* test posix thread folder proxy */ - - -#include "camel.h" - -CamelThreadProxy *proxy; -CamelFuncDef *func_def; - - -void -test_sync_func (int num) -{ - printf ("Sync function number %d\n", num); - printf ("Sync function : current thread : %d\n", pthread_self ()); - -} - - -void -test_async_cb (int num) -{ - printf ("Callback number %d\n", num); - printf ("Callback : current thread : %d\n", pthread_self ()); -} - -void -test_async_func (int num) -{ - CamelOp *cb; - - printf ("Async function number %d\n", num); - printf ("Async function : current thread : %d\n", pthread_self ()); - sleep (1); - cb = camel_marshal_create_op (func_def, test_async_cb, num); - camel_thread_proxy_push_cb (proxy, cb); - - -} - -int -main (int argc, char **argv) -{ - int i; - CamelOp *op; - - camel_init (); - - func_def = - camel_func_def_new (camel_marshal_NONE__INT, - 1, - GTK_TYPE_INT); - - printf ("--== Testing Simple marshalling system ==--\n"); - for (i=0; i<5; i++) { - printf ("Iterration number %d\n", i); - op = camel_marshal_create_op (func_def, test_sync_func, i); - camel_op_run (op); - camel_op_free (op); - - } - printf ("\n\n"); - - proxy = camel_thread_proxy_new (); - - printf ("--== Testing Asynchronous Operation System ==--\n"); - for (i=0; i<5; i++) { - printf ("Pushing async operation number %d for execution\n", i); - op = camel_marshal_create_op (func_def, test_async_func, i); - camel_thread_proxy_push_op (proxy, op); - } - printf ("\n\n"); - printf ("--== Operations execution planned ==--\n"); - gtk_main (); -} - |