LLocalSearch icon indicating copy to clipboard operation
LLocalSearch copied to clipboard

Adding conc as a dep for simple concurrency handling

Open XiaoConstantine opened this issue 1 year ago • 2 comments

Use conc to simplify a bit the concurrency code Some cleanup

XiaoConstantine avatar Apr 05 '24 02:04 XiaoConstantine

Uh, the conc package looks nice for handling unexpected client disconnects / writing to a nil channel errors. I think this would allow me to remove the panic handler on top of the agentChain file, right? Assuming I understand, https://github.com/sourcegraph/conc?tab=readme-ov-file#goal-2-handle-panics-gracefully correctly?

Also thanks for the added error handling.

nilsherzig avatar Apr 05 '24 08:04 nilsherzig

Uh, the conc package looks nice for handling unexpected client disconnects / writing to a nil channel errors. I think this would allow me to remove the panic handler on top of the agentChain file, right? Assuming I understand, https://github.com/sourcegraph/conc?tab=readme-ov-file#goal-2-handle-panics-gracefully correctly?

Also thanks for the added error handling.

:) I haven't doing go dev for quite a while, just throw it here to see if you think it's benefitial for simplicity.

Yea, personally I like the way conc remove the boilerplate for engineer to write code for concurrency, for the specific panic handler, I think we can leave the work to the conc default handling mechanism

XiaoConstantine avatar Apr 05 '24 14:04 XiaoConstantine

Woo, amazing progress! Gonna close this one

XiaoConstantine avatar May 07 '24 18:05 XiaoConstantine