Hello,
Besides using ParallelFor() I have never had much to do with threading.
On program startup, we check our web server for available updates of our plugin. At the moment, this is done in the main thread, hence blocking it and prolonging program startup time. Therefore, I want to move that into a separate thread. I looked into the SDK docs for inspiration, and found that Jobs might be what I need.
Question 1: (solved already, my bad)
Looking at the example for for FactorialJob (https://developers.maxon.net/docs/Cinema4DCPPSDK/html/page_maxonapi_threading_jobs.html#page_maxonapi_threading_jobs_job), I see that the constructor that takes the input data (maxon::UInt
) must be marked with MAXON_IMPLICIT
. This is the first thing not working for me:
I see MAXON_IMPLICIT is defined in apibase.h
, but including the header does not change anything, the errors are still there.
Question 2:
In the documentation of JobCueueInterface
, an example file called filterwhirl.cpp
is mentioned, which I'd love to take a look at. Where can I find it? The article also mentions tutorials, which I could not find.
Question 3:
Our update check currently invokes a Python plugin for the actual HTTP request to our online REST API (called via CallCommand()
, there are different reasons why we did it that way, it will have to remain this way for a while). Since in the Job Manual (https://developers.maxon.net/docs/Cinema4DCPPSDK/html/page_maxonapi_threading_jobs.html) it states explicitly: "Make sure that a job has no additional, hidden dependencies like for example executing parallelized code internally.", does this mean I cannot parallelize this at all?
Seasoned programmer, but with greenhorn threading questions ;-)
I'm hoping to get some answers that will get me started without investing too much time into this.
Thank you in advance & best greetings from Berlin,
Frank