/* 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 (); } /npm_and_yarn/devel/electron4/files/bl-1.2.3'>dependabot/npm_and_yarn/devel/electron4/files/bl-1.2.3 FreeBSD GNOME current development ports (https://github.com/freebsd/freebsd-ports-gnome)
aboutsummaryrefslogtreecommitdiffstats
path: root/net-p2p/hx
Commit message (Expand)AuthorAgeFilesLines
* Populate newly create net-p2p category with these ports:pav2006-01-311-1/+1
* - Add SHA256pav2005-11-261-0/+1
* - Remove dead master sitepav2005-09-142-7/+1
* - Support MAN properlykrion2004-03-102-3/+11
* SIZEify.trevor2004-01-301-0/+1
* fix master_sites for net/hxedwin2003-11-032-2/+2
* ports with possibly unreachable MAINTAINERsedwin2003-11-021-1/+1
* De-pkg-comment.knu2003-02-212-1/+1
* Style police: WWW tags should either end in a file/script or TRAILING /; Fix ...lioux2001-11-211-1/+1