We would like to build a community for Small Basic programmers of any age who like to code. Everyone from total beginner to guru is welcome. Click here to register and share your programming journey!


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threading
#8
The point of the Flickr is just showing something else using threads and how the CallComplete can be used, no deep significance.  If you make num1..3 bigger then DoWork will take longer and the Flickr may finish first.

We call DoWork1..3 (3 of them) and each writes out following when they complete (+ anything you add in the DoWork subroutines).  It's maybe not the most sensible output, but is shows the state of all 3 DoWorks as each one finishes, i.e. that the longer lasting jobs are part way through when the the shorter jobs finish.

Code:
    TextWindow.WriteLine("Total = "+total1+" : "+total2+" : "+total3)
    TextWindow.WriteLine("Count = "+num1+" : "+num2+" : "+num3)
[-] The following 1 user Likes litdev's post:
  • jrmrhrb00
Reply


Messages In This Thread
Threading - by jrmrhrb00 - 01-09-2025, 03:27 PM
RE: Threading - by AbsoluteBeginner - 01-09-2025, 07:12 PM
RE: Threading - by litdev - 01-10-2025, 11:40 AM
RE: Threading - by jrmrhrb00 - 01-10-2025, 06:58 PM
RE: Threading - by z-s - 01-11-2025, 02:33 AM
RE: Threading - by litdev - 01-11-2025, 10:30 AM
RE: Threading - by jrmrhrb00 - 01-11-2025, 06:25 PM
RE: Threading - by litdev - 01-12-2025, 08:15 AM
RE: Threading - by jrmrhrb00 - 01-12-2025, 02:32 PM
RE: Threading - by litdev - 01-12-2025, 10:48 PM
RE: Threading - by jrmrhrb00 - 01-13-2025, 07:51 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)