Matt Massicotte on Nostr: It can be very hard to make classes Sendable. But when it’s hard, it’s also a ...
It can be very hard to make classes Sendable. But when it’s hard, it’s also a sign it is not the right solution.
The alternative, find out why you want this to be Sendable in the first place and change *that* might require rethinking how you are using concurrency. And that could be harder, but it’s where you should start.
Published at
2024-04-05 14:34:05Event JSON
{
"id": "ac38213f3eedaf0f6eb41abacd4aeaf2a77c7c9b75bcba9a0f6de767c48f955e",
"pubkey": "326c9100a3d1f1ecd0d35bf9590b2633e6c22a25debb08aac79d5af903bd8672",
"created_at": 1712320445,
"kind": 1,
"tags": [
[
"proxy",
"https://mastodon.social/users/mattiem/statuses/112218632740391714",
"activitypub"
]
],
"content": "It can be very hard to make classes Sendable. But when it’s hard, it’s also a sign it is not the right solution.\n\nThe alternative, find out why you want this to be Sendable in the first place and change *that* might require rethinking how you are using concurrency. And that could be harder, but it’s where you should start.",
"sig": "9de6261ac8050e77c275960d70c9ec06b26d01d4c535f098b6d535b578c19de7d469bb9fbdd1a96abc1265fd79e8beb71f6c5ddeac06d2a122c2ca087a3a7cef"
}