ipfs-rust / ipfs-embed

A small embeddable ipfs implementation
352 stars 48 forks source link

Make sure the gc task does not die too fast #103

Closed rklaehn closed 3 years ago

rklaehn commented 3 years ago

Currently, the StorageService implements Clone, but the Drop impl will immediately signal the gc task to finish. So as soon as you create a single short lived clone of the StorageService and drop it, the gc task is gone.

This does the usual pattern of having an XXXInner and having the Drop on the inner. The outer is just an arc wrapper now.