every and each unmounting...
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
Línea de trabajo
Comienza con el comportamiento de AutoUnmount de Observable y las clases Browser::Interval y Browser::Delay mencionadas en la issue. Revisa cómo every, each, every! y each! gestionan actualmente el unmounting y, a continuación, determina cuáles de las semánticas propuestas y qué comportamiento de override deben implementarse. Se considera terminado cuando el comportamiento elegido del ciclo de vida del temporizador es coherente y está cubierto por las pruebas relevantes del proyecto.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
every makes sense, as the timer will keep running for ever. But should any each timer that is still running when things unmount also be unmounted? Note that Observable includes AutoUnmount, so any store will get this behavior as well!
Then, on the other hand, there is an each! and every! method (they don't auto start, so you have to say each!(x).start. Neither of these timers IS auto-unmounted.
Couple of options:
- just take after out of unmount, and forgettabout it.
- 1 + provide a remove_after_timers method callable in Observable
- leave it, and if you want a timer that isn't unmounted use the bang variation.
- provide auto_unmount(x) attached to the timers so you say:
after(12).auto_unmount(true)orevery(12).auto_unmount(false)to override the defaults.
Currently I think its best to make both every and every! behave the same, and make each and each! not autounmount, and then add the auto_unmount method to the Browser::Interval and Browser::Delay classes.
attr_accessor :mount_point
def auto_unmount(yes)
# warning message and return if mount_point is nil
if yes
AutoUnmount.objects_to_unmount[mount_point] << self
else
AutoUnmount.objects_to_unmount[mount_point].delete(self)
end
end
alias unmount abort
now all the automounter does is set mount_point
def every!(*args, &block)
super.tap do |id|
next id if unmounted?
id.mount_point = self
id.auto_unmount(true)
end
end
def after!(*args, &block)
super.tap { |id| id.mount_point = self unless unmounted? }
end
- Lenguaje dominante
- JavaScript
- Estrellas
- 538
- Forks
- 41
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de hyperstack-org/hyperstack
-
expose_as_operations method Abiertoenhancement needs doc
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
hyperstack-org/hyperstack#359 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
hyperstack-org/hyperstack#267 ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
hyperstack-org/hyperstack#457 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
hyperstack-org/hyperstack#456 ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 15/100
hyperstack-org/hyperstack#455 · 2 comentarios ·
Todos los issues de hyperstack-org/hyperstack
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
palladius/rails8-app-on-gcp#145 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
dotenvx/dotenv-vscode#139 ·
-
test-change-proposal
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
web-platform-tests/interop#1455 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
corsairdev/corsair#1764 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100