1. 13
  1. 5

    The portability problems that I’ve seen with Python have often been as a result of people not realizing that some behaviour is impdef in POSIX. For example, signals sent to a process are always delivered to the first thread in a process on Linux because Linux threads are processes that happen to share an address space, whereas on FreeBSD processes and threads are both first-class objects and so it is delivered to whichever thread is the first to reach a point where signals will be picked up.

    How does Cosmopolitan paper over that kind of difference?

    1. 2

      The answer as I understand it is “it doesn’t”, and the linked article points out both that the author couldn’t get Python’s threading to work and gave up on it, and that Cosmopolitan doesn’t do multithreading. There’s a claim of “doesn’t do it yet”, but I suspect that threading is going to be the first of many things that turn out to be much more complex to make “portable” in this sense – by comparison, platform-specific executable formats and such are probably quite simple, and that’s saying something.