Hi,
On Fri, Feb 6, 2015 at 8:16 PM, Alexander Broekhuis <[email protected]> wrote: > Hi all, > > Since I'm not sure if all of you are following the commits list, I've send > forwarded this one. > > Daniel raised this issue, and I'm not yet sure how to fully solve it. If > anyone has any ideas, please add those to the issue. Well reading the requirements for calling curl_global_init I only see one option, if we want to use curl: Adding a doing the init in the celix framework and as result add curl as a "default" library. Or look for an alternative for libcurl? > > Thanks! > > > 2015-02-06 20:14 GMT+01:00 Alexander Broekhuis (JIRA) <[email protected]>: > >> >> [ >> https://issues.apache.org/jira/browse/CELIX-215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14309677#comment-14309677 >> ] >> >> Alexander Broekhuis commented on CELIX-215: >> ------------------------------------------- >> >> Looking at the API of curl, I see how it is intended to use. But looking >> at the principle idea of Celix (or OSGi in general) I do not see how to fit >> the current usage of Curl in Celix. >> >> To clarify, following the spec bundles are loaded unordered, while there >> currently is a side effect of the launcher, this is not something we can >> rely on. Also, any bundle can use Curl, as such the start/stop point of >> Curl is not known. >> >> One possible (partial) solution would be to create a separate Curl bundle >> that takes care of the global_init and global_destroy calls. Any bundle >> wanting to use Curl would depend on this bundle. So in turn curl_easy_init >> is only used when the Curl bundle is started. >> This, however, does not satisfy the Curl requirement that no threads must >> be started before calling global_init, because any other bundle not using >> Curl can already be started and have started threads as well. >> >> I'll think about this a bit more. Any ideas are welcome as well! >> >> > curl_global_init() not called directly >> > -------------------------------------- >> > >> > Key: CELIX-215 >> > URL: https://issues.apache.org/jira/browse/CELIX-215 >> > Project: Celix >> > Issue Type: Bug >> > Reporter: Daniel Parker >> > Priority: Minor >> > >> > curl_global_init() is called by curl_easy_init() if it has not been >> called already (so the system works as-is), but according to the >> documentation, curl_global_init() is not thread-safe, so it really ought to >> be called in launcher.c::main() before it starts spawning threads. >> > Also, curl_global_cleanup() needs to be called after we're done with >> curl. >> >> >> >> -- >> This message was sent by Atlassian JIRA >> (v6.3.4#6332) >> > > > > -- > Met vriendelijke groet, > > Alexander Broekhuis
