Git Product home page Git Product logo

Comments (10)

lihuiba avatar lihuiba commented on May 18, 2024 1

@medvednikov @joe-conigliaro BTW, the threading part of photon now supports Windows via mingw (msys2). See https://github.com/alibaba/PhotonLibOS/pull/185/files#diff-f0db3c6fae5cc5fe519ada39d68af66b8c177096a3ee36c0d92893be964cf34c details.

from photonlibos.

lihuiba avatar lihuiba commented on May 18, 2024

Porting directives:

https://github.com/ivmai/bdwgc/blob/master/docs/porting.md#thread-support

from photonlibos.

lihuiba avatar lihuiba commented on May 18, 2024

@medvednikov take look at this

from photonlibos.

medvednikov avatar medvednikov commented on May 18, 2024

Great, thanks! Will do.

from photonlibos.

medvednikov avatar medvednikov commented on May 18, 2024

Hey,

Just wanted to give you an update.

We managed to successfully make Photon work in V with the Boehm GC by using the recently introduced set_photon_thread_stack_allocator.

The change turned out to be very simple:
vlang/v@9604a3f

So thanks a lot for that! This surely made Photon a great option for all GC languages.

from photonlibos.

lihuiba avatar lihuiba commented on May 18, 2024

@medvednikov

Glad to know it's working.

And I didn't expect that the allocator could be implemented in V. It's really cool!

from photonlibos.

joe-conigliaro avatar joe-conigliaro commented on May 18, 2024

@lihuiba Thanks for all the assistance. I was surprised how easy it was to add support (using the functions you provided).

Regarding the allocator, I did try using the default allocator and also the stackful_malloc function provided, however I kept getting segfaults.

our malloc uses the GC malloc (when GC is on), so Im guessing if we were to use another allocator we may need to provide some extra information to the GC as well as the roots. I'm not sure though, that is just a guess. Or perhaps I have to correct for page size when supplying the roots due to the alignment your allocator does.

from photonlibos.

lihuiba avatar lihuiba commented on May 18, 2024

@joe-conigliaro the stackful_malloc is intended for efficient context allocation in stackless coroutine, such as the one in C++20. It assumes a FILO order of allocation and deallocation. It is NOT a generic allocator.

from photonlibos.

joe-conigliaro avatar joe-conigliaro commented on May 18, 2024

Thanks for the reply @lihuiba, I had a feeling it was used for something like that due to the comment

from photonlibos.

medvednikov avatar medvednikov commented on May 18, 2024

Amazing news!

from photonlibos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.