I need to start a new thread inside a mathematica function. My example is about image aquisition and processing.
Do[Pause[.5] im = CurrentImage;(*start an other thread for im processing*), \ Infinity]
Mathematica Stack Exchange is a question and answer site for users of Wolfram Mathematica. It only takes a minute to sign up.Sign up to join this community
The video surveillance application mentioned by the OP in the comments can be approached using
Dynamic. This version takes the difference between consecutive images, if the total value of the differences is large enough, then it sends an alert (i.e., it prints the word "Alert" in the messages box).
Dynamic[img = ImageDifference @@ CurrentImage; If[Total[ImageData[img], 3] > 10000, Print["Alert"]]; img]