feat(supercomputer,experimental): deepen share, steal, beacon, whisper
Bandwidth revoke/best offer, work-stealer batch/flush, entropy snapshot, whisper clearSeen, and phase-shift setPhase/maxPeerDelta. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -87,6 +87,18 @@ class HyperP2PWorkStealer extends EventEmitter {
|
||||
return null
|
||||
}
|
||||
|
||||
pushBatch (shard, tasks) {
|
||||
if (!Array.isArray(tasks)) throw new Error('tasks array required')
|
||||
return tasks.map((task) => this.push(shard, task))
|
||||
}
|
||||
|
||||
flushShard (shard = 'default') {
|
||||
const q = this._queue(shard)
|
||||
const n = q.length
|
||||
q.length = 0
|
||||
return n
|
||||
}
|
||||
|
||||
async ready () {
|
||||
if (this.swarm || !this.topic) return this
|
||||
await initModuleSwarm(this, {
|
||||
|
||||
Reference in New Issue
Block a user