mirror of
https://github.com/kalmarek/Groups.jl.git
synced 2024-11-19 06:30:29 +01:00
asynchronously compute images in == for Automorphisms
This commit is contained in:
parent
38fbed7f76
commit
1c659d5216
@ -256,13 +256,20 @@ function (==)(g::Automorphism{N}, h::Automorphism{N}) where N
|
|||||||
|
|
||||||
@assert !ismodified(g) && !ismodified(h)
|
@assert !ismodified(g) && !ismodified(h)
|
||||||
# cheap
|
# cheap
|
||||||
hash(g) != hash(h) && return false # hashes differ, so images must have differed as well
|
# if hashes differ, images must have differed as well
|
||||||
# equal elements, or possibly hash conflict
|
hash(g) != hash(h) && return false
|
||||||
if !img_c
|
# equal elements, or possibly a hash conflict
|
||||||
img = compute_images(g)
|
begin
|
||||||
end
|
if !img_computed
|
||||||
if !imh_c
|
img_task = Threads.@spawn img = compute_images(g)
|
||||||
imh = compute_images(h)
|
# img = compute_images(g)
|
||||||
|
end
|
||||||
|
if !imh_computed
|
||||||
|
imh_task = Threads.@spawn imh = compute_images(h)
|
||||||
|
# imh = compute_images(h)
|
||||||
|
end
|
||||||
|
!img_computed && fetch(img_task)
|
||||||
|
!imh_computed && fetch(imh_task)
|
||||||
end
|
end
|
||||||
return img == imh
|
return img == imh
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user