{"id":21948140,"url":"https://github.com/evolution-gaming/serially","last_synced_at":"2026-01-11T17:03:26.055Z","repository":{"id":43059014,"uuid":"132166855","full_name":"evolution-gaming/serially","owner":"evolution-gaming","description":null,"archived":false,"fork":false,"pushed_at":"2024-07-29T14:17:24.000Z","size":82,"stargazers_count":1,"open_issues_count":14,"forks_count":1,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-02T16:14:21.377Z","etag":null,"topics":["akka","concurrency","scala"],"latest_commit_sha":null,"homepage":null,"language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/evolution-gaming.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-04T16:59:12.000Z","updated_at":"2024-07-18T10:45:51.000Z","dependencies_parsed_at":"2024-07-21T13:16:46.204Z","dependency_job_id":null,"html_url":"https://github.com/evolution-gaming/serially","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/evolution-gaming/serially","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evolution-gaming%2Fserially","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evolution-gaming%2Fserially/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evolution-gaming%2Fserially/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evolution-gaming%2Fserially/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/evolution-gaming","download_url":"https://codeload.github.com/evolution-gaming/serially/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evolution-gaming%2Fserially/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28314261,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T14:58:17.114Z","status":"ssl_error","status_checked_at":"2026-01-11T14:55:53.580Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["akka","concurrency","scala"],"created_at":"2024-11-29T05:12:10.137Z","updated_at":"2026-01-11T17:03:26.038Z","avatar_url":"https://github.com/evolution-gaming.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Serially\n[![Build Status](https://github.com/evolution-gaming/serially/workflows/CI/badge.svg)](https://github.com/evolution-gaming/serially/actions?query=workflow%3ACI)\n[![Coverage Status](https://coveralls.io/repos/github/evolution-gaming/serially/badge.svg?branch=master)](https://coveralls.io/github/evolution-gaming/serially?branch=master)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/9ac9217e2baf498ebfe996e163d849b1)](https://www.codacy.com/app/evolution-gaming/serially?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=evolution-gaming/serially\u0026amp;utm_campaign=Badge_Grade)\n[![Version](https://img.shields.io/badge/version-click-blue)](https://evolution.jfrog.io/artifactory/api/search/latestVersion?g=com.evolutiongaming\u0026a=serially_2.13\u0026repos=public)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellowgreen.svg)](https://opensource.org/licenses/MIT)\n\nThis library contains `Serially.scala` which allows to run tasks serially\nThe behavior is somehow similar to what actors propose, however it provides typesafety.\nAlso it is easy to write tests using `Serially.now` to avoid unnecessary concurrency.\n\n## `Serially` example \n\nThis example explains how we can ensure that there are no concurrent updates to `var state`\n\n```scala\nval system = ActorSystem() // yes, we have dependency on akka\nval serially = Serially()\n\nvar state: Int = 0\n\n// this runs sequentially, like message handling in actors \nserially {\n state = state + 1\n}\n\n// you also can expose computation result as Future[T]\nval stateBefore: Future[Int] = serially {\n  val stateBefore = state\n  state = state + 1\n  stateBefore\n} \n```\n\n## `StateVar` example\n\nBasically the same as on previous example with less code\n\n```scala\nval system = ActorSystem()\nval serially = Serially()\nval state = StateVar(0, serially)\nval result: Future[String] = state { before =\u003e \n  val after = before + 1\n  (after, \"ok\")\n} \n```\n\n\n## Setup\n\n```scala\naddSbtPlugin(\"com.evolution\" % \"sbt-artifactory-plugin\" % \"0.0.2\")\n\nlibraryDependencies += \"com.evolutiongaming\" %% \"serially\" % \"1.0.6\"\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevolution-gaming%2Fserially","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevolution-gaming%2Fserially","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevolution-gaming%2Fserially/lists"}