Skip to content

t/read-the-docs

Read The Docs: top posts

The most useful posts in this topic, by likes from the community.

Posts

  1. Article

    Kotlin coroutines in a Spring service: three leaks we shipped and what structured concurrency fixed

    We run our routing service in Kotlin on Spring Boot. Coroutines were introduced two years ago by enthusiastic people, including me. Here are the three mistakes we made, all of them explained in the kotlinx.coroutines docs, which none of us had read properly. Hence the topic. 1. GlobalScope for fire-and-forget fun ship(order: Order) { GlobalScope.launch { auditClient.record(order.id, "shipped") }…

    Bram Verhoeven22likes9comments

  2. Question

    Respected members, why does my Python function remember the old list?

    Respected members, I am a mathematics teacher learning Python so that I can teach my Class 9 students properly. I wrote a small function to collect marks, and something very strange is happening. Kindly see: def add_mark(mark, marks=[]): marks.append(mark) return marks print(add_mark(45)) # [45] print(add_mark(78)) # [45, 78] I expected [78] print(add_mark(62)) # [45, 78, 62] Each time I call the function without…

    Lakshmi Prasad14likes8comments

Get the best of Dynamo Geeks weekly

One email each Monday with the most useful posts. No spam; unsubscribe in one click.