Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    using C++11 std::thread [CLOSED]

    SDK Help
    0
    5
    489
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      On 27/11/2014 at 14:04, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   13+ 
      Platform:   Windows  ; Mac  ;  Mac OSX  ; 
      Language(s) :     C++  ;

      ---------
      I understand that it is advised not to use exceptions in external dlls, and I wanted to use std::thread "which throws lots of exceptions" , is this possible? or I misunderstand something

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        On 28/11/2014 at 02:47, xxxxxxxx wrote:

        Hello Mohamed,

        theoretically it is possible to use std::thread. But we won't be able to support you with this.

        I personally never tried this, but I guess, there are numerous pitfalls. Beginning with project setup and configuration (by default exceptions are disabled in example plugin projects) and then with the exceptions themselves. It is not easy at all, to handle exceptions correctly in a multithreaded environment. For example any cleanup needed after an exception can cause a plethora of bugs, if not done correctly.

        Please understand, that it's not easy for me to answer this question. I don't know your skills, nor do I know, what you are trying to achieve in the end. Thus I can not recommend to try this and I have to stress once again, that the SDK Support Team can not help with this. It is simply beyond our scope. Sorry.

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          On 28/11/2014 at 03:23, xxxxxxxx wrote:

          the whole threading work will be in an external dll "which will get called from a Cinema 4D plugin dll"

          1 Reply Last reply Reply Quote 0
          • H
            Helper
            last edited by

            On 28/11/2014 at 03:29, xxxxxxxx wrote:

            Well, then the threading (and event handling) is encapsulated in that library, and internally the library does not interact with C4D? While your C4D plugin is only using an interface to interact with the library?So you don't even have to enable exceptions in your C4D plugin project? Then I think, this should work fine.

            Still the bottom line remains, we can't help with external libraries. Sorry.

            1 Reply Last reply Reply Quote 0
            • H
              Helper
              last edited by

              On 28/11/2014 at 03:33, xxxxxxxx wrote:

              I totally understand !Smile[URL-REMOVED] that you can't help with external libraries.
              was making sure that external dlls that got exceptions are fine, the C4D plugin itself will has no exceptions.

              thanks for the help Andreas.


              [URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post