David Richardson
Fri, 10 Jul 2009 17:07:00 -0700
I'm using librapi for some really cool testing framework stuff at Flexilis. I'm really trying to push the limits of the library. I've wrapped librapi in ruby using Ruby::DL but currently I have to mutex on any RAPI call. I'd really like to only have to mutex per-device. Ruby only uses green threads so the existing thread safe stuff isn't going to help me, I believe. I want to run tests on hundreds of devices in parallel.
What I want to do is create alternative wrappers for each RAPI function where I pass the context in as the last parameter, rather than specifying it ahead of time with . I tried some initial experimentation with this yesterday, but didn't have much luck. Before I dive too deep into it, I wanted to make my proposal and hear any comments you have. Specifically I'm concerned about how the contexts work and when/how they become invalidated. Serially I will create each connection (rapi_connection_from_name), select it (rapi_connection_select), initialize it (CeRapiInit) and store the current context (get_current_context). Then in parallel I will call modified RAPI functions on hundreds of devices that take the context in as a paramater. I notice that the act of selecting a connection unref's the previously selected connection and destroys it (since this was the only reference). Is it sufficient for me to just store a reference to each context and call rapi_context_ref (and unref when I'm done)? Is there anything else that would invalidate the previous context? I'll hopefully be experimenting with this sometime next week. Is this a change that others would be interested in contributing toward librapi's trunk? Do you have a suggestion of a better way to go about this? Is there maybe some existing functionality that I'm missing that already allows this? Thanks! -David Richardson Flexilis Mobile Security
------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge
_______________________________________________ SynCE-Devel mailing list SynCE-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synce-devel