Skip to main content
smarts19193560
Inspiring
November 3, 2017
Answered

Can I use thread that is cross platform in plugin?

  • November 3, 2017
  • 1 reply
  • 1248 views

Hi, everyone!.

I have some problem in After Effect SDK.

I'd like to use a thread that is cross platform in plugin.

Is it possible?

If so, How can I use a thread in plugin?

Thanks.

This topic has been closed for replies.
Correct answer

I am not sure I understand your question, to be honest. What exactly are you trying to achieve?

If you are using a C++11 compliant compiler, you can use the cross-platform "std::thread" class in your plugin. Alternatively you could use the "boost::thread" class from the 3rd party boost library or others like native threads (CWinThread on Windows for example) or the pthreads library.

In all cases usage in a plugin is not that much different from using threads in a standalone application and there are lots of example sources and tutorials on the net.

1 reply

Correct answer
November 3, 2017

I am not sure I understand your question, to be honest. What exactly are you trying to achieve?

If you are using a C++11 compliant compiler, you can use the cross-platform "std::thread" class in your plugin. Alternatively you could use the "boost::thread" class from the 3rd party boost library or others like native threads (CWinThread on Windows for example) or the pthreads library.

In all cases usage in a plugin is not that much different from using threads in a standalone application and there are lots of example sources and tutorials on the net.

Community Expert
November 3, 2017

to add on what Toby has said, you can use as may thread as you'd like.

however you can only communicate with AE when AE calls your effect. (except

for CauseIdleRoutinesToBeCalled())

On Fri, Nov 3, 2017 at 12:11 PM, Toby (reduxFX) <forums_noreply@adobe.com>

smarts19193560
Inspiring
November 3, 2017

Thanks for your replay.

I tried to use the std::thread.

But when I add thread library as you can see on screenshot, I am getting a lot of errors.

I am not sure why the error appears. I am using Visual Studio 2015 now.