# Why so few methods defined for \`Atomic\` types?

**URL:** <https://discourse.julialang.org/t/why-so-few-methods-defined-for-atomic-types/96960>\
**Category:** General Usage\
**Tags:** threads, atomic\
**Created:** [April 2, 2023, 1:51am UTC](https://discourse.julialang.org/t/why-so-few-methods-defined-for-atomic-types/96960 "2023-04-02T01:51:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![adienes](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adienes/32/37459_2.png) [@adienes](https://discourse.julialang.org/u/adienes)\
**Post date:** [April 2, 2023, 1:51am UTC](https://discourse.julialang.org/t/why-so-few-methods-defined-for-atomic-types/96960/1 "2023-04-02T01:51:10Z")

</div>

I am trying to use `Atomic` wrapped types, but I find there are very few methods defined; I assuming this is intentional, but I’d be curious to hear more about the limitations that prevent these from being included! A list of calls I tried:

```julia
zero(Atomic{Int}) # MethodError
one(Atomic{Int}) # MethodError
# same for rand, typemin, typemax

isequal(Atomic{Int}(1), 1) # false -- this one is extra surprising
isless(Atomic{Int}(1), 2) # MethodError
convert(Int, Atomic{Int}(1)) # MethodError
only(Atomic{Int}(1)) # MethodError

```

Eventually I found in some GH issue that `getindex` can be used to unwrap `Atomic` types, but how come we can’t do more with them directly?
