40ants / 40ants/reblocks

Calling (update mywidget) from a new thread

Aberta
#6 2 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Common Lisp
Estrelas
101
Forks
12
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

How to make a new thread aware of the *session* it was created from ?

```lisp
(:input :type "button" :value "Add random task (with (update) called from a different thread)" :onclick
(weblocks/actions:make-js-action
(lambda (&rest args )
(add-task task-list (format nil "~A" (random 1001)))
(bt:make-thread
(lambda ()
(weblocks/dependencies:with-collected-dependencies
(sleep 0.5)
(update task-list) ; ERROR: Session was not created for this request!
))))))
```

complete executable code to illustrate the problem: https://gist.github.com/bamboospirit/e6ad95503ec40d2c7649f4aa14ad4979#file-thr-update-lisp

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Direção de pesquisa

The issue shows a code snippet where updating a widget from a new thread fails due to missing session context. Examine how sessions are managed in reblocks, particularly the session handling and threading model. Look at the weblocks/dependencies module and the update function to understand session propagation. The gist linked provides a complete example to reproduce the error.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Domínio
backend
Tipo de issue
Bug
Dificuldade
4/5
Tempo estimado
3-5 dias
Status de atividade
Estagnada
Clareza
Razoavelmente clara
Facilidade para iniciantes
45/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.