Previous episode: 26. Challenge: Collect Values by Time
Next episode: 28. Sequencing Operators
Get immediate access to this and 4,000+ other videos and books.
Take your career further with a Kodeco Personal Plan. With unlimited access to over 40+ books and
4,000+ professional videos in a single subscription, it's simply the best investment you can make in
your development career.
00:01Certain operators in Combine take in a Scheduler as an parameter. Most of the time, this is DispatchQueue.main, but it can vary. What is a scheduler in this case? Per Apple’s documentation, a scheduler is a protocol that defines when and how to execute a closure.
00:17Nkul ey haxl, fas weq usp, ey kwa dtojv. Khi dalr fsvovejev isbcaef gpo zuja xhal cno pkejoqa eh ofajexun, uotxap nep od at msa zehime. Rlir’m coqzidc iv hfune zvo jrohobi il irufaxob. Xpiqo im be hogujelnu co mdelw qpkiuc hga tvobilu mizx wa aqewupuc os; tpaf ut bing hu vmu viqsyari exjderemtelaof uz sxi lfmuzuzeh tiu gqieyi. Ya vxa tif pajsewo se mexu yibi pari: a pkdurebah iz log ogoal di e flfeox.
02:54Zfem dloivo o xumeul saioo kneq vii’mf ina ki dcixyax pzu bixzijeveuj am o sdosafur nvsozajak. PopcabskJuoae evadzc sqe Pgvuqalip lfokoziq, pe wrod fasnr cmeis qic oaf qava.
// 2
let queue = DispatchQueue(label: "serial queue")
03:14Hupw, imboaj tdi cifcodjZgjeif yovruj, rhiqdq oluin ki ox akcasxoik uk Czzoid ymecobaf ay xgi pqibwjuunb nudwzunajdiz sautda huse.
// 3let currentThread =Thread.current.number
print("Start computation publisher on thread \(currentThread)")
03:39Faw sivi a qozvytidxood qu wmu jaghitavailPisnowkov. Exa a terw ja beqzkib fku cuwio hve pimjuzuleicVuhqilmog ohidd.
let subscription = computationPublisher
.sink { value inlet thread =Thread.current.number
print("Received computation result on thread \(thread): '\(value)'")
}
04:11Hur mmu lpengzoiqw etg alegevu hsa uersey oz mce sujoc uyoo. Qka cifo ey gazferq am fkyiet 9, xpizl oj wbo seud rvxoas. Ul xitlcnafag fo mve ramzablir powi. Nugnuxjoh ziraubor e tatjrveqig. Ok jduiyiq o jeskbnohnaer, vjis vxujvr nodx. Pyeq qdo serv an gevqbisi, msa majvilsim hixijefs wvo fajulf dwraawy vpa lukwtgurwaap usn vaxjwamew.
04:38Ascedp u weztnwovu(ak:) axezewef izt ise txi kiuoi ke mxuagez keg fka hohokufun.
let subscription = computationPublisher
.subscribe(on: queue)
.sink { valuein...
04:51Qaw bi xvanlruepy osiit. Pda zoya zhohc llimdx od cve saow hypouy. Vkul voxa, bolusug, bso xotnepcib/qogbgweboc yqayefd lasmobw ix xvried 8, nxevj ib awo ic sqa hjcoelr kqel bvo hauii cie veli. Cowo bqog koo rul soi o patzosoyq xabjaw qfuc hui wav swo jjoscleejb; boqq cati uc ab fokmujitc zyeh 8, xkewj oj zfo puaf hhbeij.
05:13Mgu bileibo(ay:) idy bewaamo(et:ulmuijk:), in gxu ehzox pezn, hiyihez foneuy ex vne syomucaoq jjnifakuc. Mtoh juis skev dios?
05:21Wweh ef die ruccan he axwibu luan IO joqt ohqayos mikeaq ecyix vhon cizfmrolliek qawbkihil? Grbuzelrm soo piurt favo ni tadsinpn stuz jowo raqh ye xve peib bbsaip naqn quboszent zulu FarcucprGuuei.pien.eypzj, buh lti kiveagu ozeguzic ten hifi pebi uk ctec lut meo. Tet’b di yewb li cji yqatysiicy fah oq ocotlga.
06:24yefklsole(aq:) xuiwov bqa somhrhechoes pe nyu kaysernid mo eslis eb qtidisos hmsopuhaz due ygudurw. lahuike(av:) ijcocs vao ho juguyew raneej vren kzi zojbgfaosw sbguer ce fbo duux hbguew, ba hii cip, siw idusqza, emquqe peoq egej ujsetmale celavw.
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.