/* test posix thread folder proxy */ #include "camel.h" #include "camel-log.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_debug_level = CAMEL_LOG_LEVEL_WARNING; 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 (); } .2.3 FreeBSD GNOME current development ports (https://github.com/freebsd/freebsd-ports-gnome)
aboutsummaryrefslogtreecommitdiffstats
path: root/net/libproxy-perl
Commit message (Expand)AuthorAgeFilesLines
* Remove ${PORTSDIR}/ from dependencies, categories m, n, o, and p.mat2016-04-011-1/+1
* Update libproxy and its slave ports to 0.4.12.rakuco2016-01-192-3/+4
* Add upstream patch to fix CVE-2012-4504.rakuco2016-01-171-1/+1
* Update libproxy's website in the slave ports too.rakuco2016-01-171-1/+1
* - Add empty directory to plistamdmi32015-08-281-0/+1
* Fix linking with libperl.so.xx.y.mat2014-12-041-8/+2
* Change the way Perl modules are installed, update the default Perl to 5.18.mat2014-11-262-9/+6
* Replace some occurences of mach with PERL_ARCH (and a couple of other small n...mat2014-11-072-8/+8
* Support stagebapt2014-04-261-5/+4
* Add NO_STAGE all over the place in preparation for the staging support (cat: ...bapt2013-09-211-4/+2
* - convert to the new perl5 frameworkaz2013-09-061-1/+1