Comparison of two Effect programs with uninterruptible sections

Are these two programs equivalent? https://effect.website/play#447be740a133
and if not, what's the difference?
const program1 = <A, E, R>(effect: Effect.Effect<A, E, R>) =>
  Effect.uninterruptibleMask((restore) =>
    Effect.gen(function*() {
      yield* Effect.log("before")
      yield* restore(effect)
      yield* Effect.log("after")
    })
  )

const program2 = <A, E, R>(effect: Effect.Effect<A, E, R>) =>
  Effect.gen(function*() {
    yield* Effect.log("before").pipe(Effect.uninterruptible)
    yield* effect
    yield* Effect.log("after").pipe(Effect.uninterruptible)
  })
Was this page helpful?