Comments (3)
Especially since it creates a whole thread.
It creates a goroutine, which is much lighter weight than a thread. E.g., if you look at the go standard library, the HTTP library will create a new goroutine per request.
However, I do generally agree. This kind of situation is why we introduced the event bus. The correct fix here is to:
- Remove the
notifee
system entirely. Well, likely deprecate it for now then remove it later. - Emit an event using the
host
.
from go-libp2p.
See #1221.
from go-libp2p.
I just deleted the "go" in my Libp2p and continued writing code.
And your Libp2p still has the creation of goroutine. And other discovery modules do not have goroutine creation, when passing peer.
Your Libp2p code is not fixed, but mine is. It's my role to tell you about the problem. But I noticed you don't listen to me at all. It's my duty to give you a chance. How you use it is up to you.
from go-libp2p.
Related Issues (20)
- Peerstore reports empty protocolID list HOT 18
- Can quic.Transport be directly connected? HOT 13
- `p2p/security/tls`: does not handle simultaneous closes HOT 3
- version 0.32.1 mdns issue HOT 4
- WebRTC: Tracking Issue HOT 2
- Make WebRTC non experimental HOT 1
- proper support for IPv6 link-local addresses HOT 7
- go-libp2p-asn-util adds ~4MiB to builds and increases build times, even in configurations where it will never be used HOT 5
- 如何搭建dht服务器,没有找到相关的代码,请问有没有热心大佬给个地址或者方法 HOT 3
- Auto Relay Doesn't Work in libp2p Network HOT 2
- Use the same port for TCP and WebSocket HOT 5
- Add Transient as a "connectedness" state HOT 2
- Per-connection protocol list HOT 2
- \network\rcmgr.go:166:27: network.NullResourceManager (type) is not an expression HOT 2
- Filter out undefined/reserved addresses HOT 13
- v0.34
- Drop support for go1.20 HOT 2
- Deprecate or improve documentation for crypto.GenerateEKeyPair HOT 3
- Why the pubsub doesn't work in my case? HOT 4
- swarm.DialPeer and host.Connect should fail when no direct/unlimited connection is available to the peer
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 go-libp2p.