# World Age Problem Explanation

**URL:** <https://discourse.julialang.org/t/world-age-problem-explanation/9714>\
**Category:** General Usage\
**Tags:** world\_age\
**Created:** [March 14, 2018, 12:33pm UTC](https://discourse.julialang.org/t/world-age-problem-explanation/9714 "2018-03-14T12:33:07Z")\
**Posts on this page:** 1\
**Showing post:** 14

<div class="post-metadata">

**Author:** ![lungben](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lungben/32/12314_2.png) [@lungben](https://discourse.julialang.org/u/lungben)\
**Post date:** [November 5, 2020, 7:25am UTC](https://discourse.julialang.org/t/world-age-problem-explanation/9714/14 "2020-11-05T07:25:17Z")

</div>

A minimal example showing this effect:

```julia
foo() = "foo"
function makebar()
	sleep(rand())
	res= (foo(), Base.invokelatest(foo))
	@eval foo() = "bar"
	res
end
fetch.(Threads.@spawn makebar() for i in 1:2)

```

The standard call to `foo()` always returns “foo” for both threads, `Base.invokelatest(foo)` returns “foo” for the thread with the shorter sleep time and “bar” for the other one.

---

_[View the full topic](https://discourse.julialang.org/t/world-age-problem-explanation/9714)._
