Comments (10)
@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.
Porting directives:
https://github.com/ivmai/bdwgc/blob/master/docs/porting.md#thread-support
from photonlibos.
@medvednikov take look at this
from photonlibos.
Great, thanks! Will do.
from photonlibos.
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.
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.
@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.
@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.
Thanks for the reply @lihuiba, I had a feeling it was used for something like that due to the comment
from photonlibos.
Amazing news!
from photonlibos.
Related Issues (20)
- What is 'randomizer' in thread_create for? HOT 2
- install option via cmake? HOT 3
- Issue building on Ubuntu/ARM HOT 11
- [Discussion] Add ENABLE_TLS option HOT 2
- Build fails on fresh Ubuntu 23.04, GCC-13 HOT 11
- Pinning Photon vcpu to specific cpu cores HOT 5
- It would be great if it supports various clients, such as grpc, redis, mysql.. HOT 5
- - HOT 1
- Thread-per-core Architecture HOT 18
- Windows IOCP backend support HOT 4
- EPOLL: Why not set EPOLLONESHOT in add_interest when ONESHOT is set? HOT 4
- Scalable Stack Discuss HOT 4
- Clarification on Lock and Synchronization HOT 19
- build with curl 8.2.1 failed, some macros are deprecated.
- Unit test with lockfree queue `PhotonLockfreeBatchMPMCQueue+Batch` reported mismatch.
- Example for RDMA HOT 2
- TLS implementation does not validate certificate chain HOT 2
- Will it support system API hooks in the future? For example, sleep, connect, recv, etc. HOT 2
- Support customized UserAgent in Http HOT 1
- examples/perf/io-perf fails with segmentation fault with io-uring: HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from photonlibos.