Results 1 to 3 of 3

Thread: Problems with crossplatformin

  1. #1

    Default Problems with crossplatformin

    Hi guys again,
    I have reviewed the sources of ClanLib for create port on android and found that
    1. There are different commands for install and uinstall services under the Windows and Unix
    under the windows: -install / -uninstall
    under the unix: -daemon
    2. The method join for the CL_Thread have been different behavior on the Window and Unix:
    under the windows: there are many threads can call this method for the same thread
    under the unix: only one thread can call join for the thread

    man pthread_join:
    If multiple threads simultaneously try to join with the same thread, the results are undefined. If the thread calling pthread_join() is canceled, then the target thread will remain joinable (i.e., it will not be detached).

  2. #2
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    1) "install and uninstall services". I am not familiar with the source code for that, but what you do say, it does appear inconsistant.

    2) "CL_Thread". Only really a problem if an application tries to join a thread from multiple threads. I cannot think of a situation where someone would actually do that.
    Normal usage is only the thread that created the worker thread will call join()

    For interest, ClanLib 3.0 (under development) now has apple support. (And DirectX)
    It may be worth visiting clanlib IRC ( http://webchat.freenode.net/?channels=clanlib ) to discuss ideas.
    There are usually active developers in there at some point during the day

  3. #3

    Default

    1. Sorry for your confused. That's no a problem on the morning.
    2. Yes, but ClanLib provide interface, which users can use. In this case the other threads are hang.
    Example? Ok:
    'main' thread starting resource loader thread
    level is very big, so thread work along time
    'main' thread starting background sound which processing in the 'sound' thread
    'sound' thread wait while resource thread returned and automaticaly start playing (resource must be already loaded)
    'main' thread popup a loading dialog, which localizated. So, it detected that the resource thread already exist, push request and wait it complited too

    Under the windows all is work
    But, when the user build his project is the linux, he must rewrite him code

    The example is laboratory, but users can do this. And they all start new threads in the forum for resolving there problem.
    At least comment must be added
    Last edited by _diman; 11-14-2012 at 04:48 PM.

Similar Threads

  1. Problems
    By slunder in forum Tanked
    Replies: 11
    Last Post: 06-27-2012, 01:53 AM
  2. OSX 10.5 problems
    By hmroz in forum Proton SDK
    Replies: 2
    Last Post: 09-16-2011, 07:48 AM
  3. FQ Problems?
    By Hawk in forum Funeral Quest
    Replies: 2
    Last Post: 02-11-2010, 10:22 PM
  4. Problems
    By Fr3DBr in forum Official ClanLib SDK Forums
    Replies: 5
    Last Post: 08-23-2009, 09:39 PM
  5. SDL Problems under 0.8.1
    By babyvegas in forum Official ClanLib SDK Forums
    Replies: 0
    Last Post: 05-20-2009, 05:41 PM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •