[HN Gopher] macOS Tips for Programmers: Threading
       ___________________________________________________________________
        
       macOS Tips for Programmers: Threading
        
       Author : todsacerdoti
       Score  : 32 points
       Date   : 2024-11-25 19:02 UTC (3 hours ago)
        
 (HTM) web link (blog.xoria.org)
 (TXT) w3m dump (blog.xoria.org)
        
       | doctorpangloss wrote:
       | Apple loves making stuff for middleware developers.
        
       | physicsguy wrote:
       | > Recommendation: replace your program's threading with Dispatch.
       | 
       | The Apple assumption that people writing software they want to
       | work on MacOS isn't cross platform strikes again.
        
         | krackers wrote:
         | libdispatch is open-source and cross platform though.
        
           | physicsguy wrote:
           | Heh, news to me. I've always stuck with OpenMP for cross
           | platform across Mac/Windows/Linux
        
             | jshier wrote:
             | Apple specifically compiles OpenMP support out of their
             | builds of clang, so that's never been an easy solution on
             | macOS. Even worse if you want to run on other Apple
             | platforms where an external compiler can't be used.
        
               | physicsguy wrote:
               | In practice the software I've worked on has typically
               | been engineering/scientific. Back in older pre-ARM days
               | that meant Intel compiler toolchain on all platforms.
        
               | cvadict wrote:
               | Iirc. you just need the openMP libraries from a
               | compatible version of clang.
        
         | wat10000 wrote:
         | Pthreads are available and work fine if you want cross-platform
         | code.
        
       ___________________________________________________________________
       (page generated 2024-11-25 23:01 UTC)